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")
52 _what(_argId +
" -- " + _errorText) {}
62 std::string
error()
const {
return (_errorText); }
68 if (_argId ==
"undefined")
71 return (
"Argument: " + _argId);
77 const char *
what()
const throw() {
91 std::string _errorText;
102 std::string _typeDescription;
121 const std::string &
id =
"undefined")
123 std::string(
"Exception found while parsing ") +
124 std::string(
"the value the Arg has been passed.")) {}
140 const std::string &
id =
"undefined")
142 std::string(
"Exception found when the values ") +
143 std::string(
"on the command line do not meet ") +
144 std::string(
"the requirements of the defined ") +
145 std::string(
"Args.")) {}
161 const std::string &
id =
"undefined")
163 std::string(
"Exception found when an Arg object ") +
164 std::string(
"is improperly defined by the ") +
165 std::string(
"developer.")) {}
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 typeDescription() const
Returns the type of the exception.
std::string argId() const
Returns the argument id.
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 when TCLAP thinks the program should exit.
int getExitStatus() const
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.