14#include "arcane/utils/ArcanePrecomp.h"
16#include "arcane/utils/Iostream.h"
17#include "arcane/utils/InvalidArgumentException.h"
18#include "arcane/utils/OStringStream.h"
29InvalidArgumentException::
41InvalidArgumentException::
42InvalidArgumentException(
const TraceInfo& where,
const String& arg_name,
44: Exception(
"InvalidArgument", where)
53InvalidArgumentException::
54InvalidArgumentException(
const TraceInfo& where,
const String& arg_name,
55 const String& arg_value)
56: Exception(
"InvalidArgument", where)
65InvalidArgumentException::
66InvalidArgumentException(
const TraceInfo& where,
const String& arg_name,
67 const void* arg_value)
68: Exception(
"InvalidArgument", where)
77InvalidArgumentException::
78InvalidArgumentException(
const TraceInfo& where,
const String& arg_name,
79 const String& message,
81: Exception(
"InvalidArgument", where)
91InvalidArgumentException::
92InvalidArgumentException(
const TraceInfo& where,
const String& arg_name,
93 const String& message,
95: Exception(
"InvalidArgument", where)
105InvalidArgumentException::
106InvalidArgumentException(
const TraceInfo& where,
const String& arg_name,
107 const String& message,
108 const String& arg_value)
109: Exception(
"InvalidArgument", where)
110, m_arg_name(arg_name)
119InvalidArgumentException::
120InvalidArgumentException(
const TraceInfo& where,
const String& arg_name,
121 const String& message,
122 const void* arg_value)
123: Exception(
"InvalidArgument", where)
124, m_arg_name(arg_name)
133InvalidArgumentException::
134InvalidArgumentException(
const InvalidArgumentException& ex)
136, m_arg_name(ex.m_arg_name)
137, m_arg_value(ex.m_arg_value)
138, m_message(ex.m_message)
145template <
typename U>
void InvalidArgumentException::
146_init(
const U& arg_value)
150 m_arg_value = ostr.str();
156void InvalidArgumentException::
157explain(std::ostream& m)
const
159 m <<
"Argument invalide: nom='" << m_arg_name
160 <<
"' valeur='" << m_arg_value <<
"'.";
161 if (!m_message.null())
162 m << m_message <<
".";
Base class for an exception.
Unicode character string.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --