24 #ifndef TCLAP_ARG_EXCEPTION_H 25 #define TCLAP_ARG_EXCEPTION_H 48 const std::string&
id =
"undefined",
49 const std::string& td =
"Generic ArgException")
64 std::string
error()
const {
return ( _errorText ); }
71 if ( _argId ==
"undefined" )
74 return (
"Argument: " + _argId );
80 const char*
what()
const throw()
82 static std::string ex;
83 ex = _argId +
" -- " + _errorText;
93 return _typeDescription;
102 std::string _errorText;
113 std::string _typeDescription;
131 const std::string&
id =
"undefined" )
134 std::string(
"Exception found while parsing " ) +
135 std::string(
"the value the Arg has been passed." ))
153 const std::string&
id =
"undefined" )
156 std::string(
"Exception found when the values ") +
157 std::string(
"on the command line do not meet ") +
158 std::string(
"the requirements of the defined ") +
159 std::string(
"Args." ))
177 const std::string&
id =
"undefined" )
180 std::string(
"Exception found when an Arg object ")+
181 std::string(
"is improperly defined by the ") +
182 std::string(
"developer." ))
SpecificationException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.
A simple class that defines and argument exception.
Thrown from CmdLine when the arguments on the command line are not properly specified, e.g.
virtual ~ArgException()
Destructor.
std::string argId() const
Returns the argument id.
ArgException(const std::string &text="undefined exception", const std::string &id="undefined", const std::string &td="Generic ArgException")
Constructor.
std::string typeDescription() const
Returns the type of the exception.
Thrown from Arg and CmdLine when an Arg is improperly specified, e.g.
ArgParseException(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.
int getExitStatus() const
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.
const char * what() const
Returns the arg id and error text.