31 #ifndef TCLAP_ARG_EXCEPTION_H 32 #define TCLAP_ARG_EXCEPTION_H 56 const std::string&
id =
"undefined",
57 const std::string& td =
"Generic ArgException")
79 if (
_argId ==
"undefined" )
82 return (
"Argument: " +
_argId );
88 const char*
what()
const throw()
90 static std::string ex;
139 const std::string&
id =
"undefined" )
142 std::string(
"Exception found while parsing " ) +
143 std::string(
"the value the Arg has been passed." ))
161 const std::string&
id =
"undefined" )
164 std::string(
"Exception found when the values ") +
165 std::string(
"on the command line do not meet ") +
166 std::string(
"the requirements of the defined ") +
167 std::string(
"Args." ))
185 const std::string&
id =
"undefined" )
188 std::string(
"Exception found when an Arg object ")+
189 std::string(
"is improperly defined by the ") +
190 std::string(
"developer." ))
203 std::runtime_error(text.c_str())
std::string argId() const
Returns the argument id.
(Added by JLBC for MRPT): An exception that indicates to CmdLine::parse that help,...
Thrown from Arg and CmdLine when an Arg is improperly specified, e.g.
std::string typeDescription() const
Returns the type of the exception.
virtual ~ArgException()
Destructor.
std::string _argId
The argument related to this exception.
ActionDoneException(const std::string &text=std::string())
Thrown from CmdLine when the arguments on the command line are not properly specified,...
Thrown from within the child Arg classes when it fails to properly parse the argument it has been pas...
std::string error() const
Returns the error text.
SpecificationException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.
CmdLineParseException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.
std::string _typeDescription
Describes the type of the exception.
std::string _errorText
The text of the exception message.
A simple class that defines and argument exception.
ArgException(const std::string &text="undefined exception", const std::string &id="undefined", const std::string &td="Generic ArgException")
Constructor.
ArgParseException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.
const char * what() const
Returns the arg id and error text.