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())
(Added by JLBC for MRPT): An exception that indicates to CmdLine::parse that help,...
ActionDoneException(const std::string &text=std::string())
A simple class that defines and argument exception.
virtual ~ArgException()
Destructor.
ArgException(const std::string &text="undefined exception", const std::string &id="undefined", const std::string &td="Generic ArgException")
Constructor.
std::string _argId
The argument related to this exception.
std::string _typeDescription
Describes the type of the exception.
std::string typeDescription() const
Returns the type of the exception.
std::string argId() const
Returns the argument id.
std::string _errorText
The text of the exception message.
std::string error() const
Returns the error text.
const char * what() const
Returns the arg id and error text.
Thrown from within the child Arg classes when it fails to properly parse the argument it has been pas...
ArgParseException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.
Thrown from CmdLine when the arguments on the command line are not properly specified,...
CmdLineParseException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.
Thrown from Arg and CmdLine when an Arg is improperly specified, e.g.
SpecificationException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.