24 #ifndef TCLAP_ARG_EXCEPTION_H 25 #define TCLAP_ARG_EXCEPTION_H 46 const std::string &
id =
"undefined",
47 const std::string &td =
"Generic ArgException")
51 _typeDescription(td) {}
61 std::string
error()
const {
return (_errorText); }
67 if (_argId ==
"undefined")
70 return (
"Argument: " + _argId);
76 const char *
what()
const throw() {
77 static std::string ex;
78 ex = _argId +
" -- " + _errorText;
92 std::string _errorText;
103 std::string _typeDescription;
119 const std::string &
id =
"undefined")
121 std::string(
"Exception found while parsing ") +
122 std::string(
"the value the Arg has been passed.")) {}
138 const std::string &
id =
"undefined")
140 std::string(
"Exception found when the values ") +
141 std::string(
"on the command line do not meet ") +
142 std::string(
"the requirements of the defined ") +
143 std::string(
"Args.")) {}
159 const std::string &
id =
"undefined")
161 std::string(
"Exception found when an Arg object ") +
162 std::string(
"is improperly defined by the ") +
163 std::string(
"developer.")) {}
190 #endif // TCLAP_ARG_EXCEPTION_H 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.
Thrown when TCLAP thinks the program should exit.
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.