Go to the documentation of this file.
31 #ifndef TCLAP_ARG_EXCEPTION_H
32 #define TCLAP_ARG_EXCEPTION_H
44 class ArgException :
public std::exception
55 ArgException(
const std::string& text =
"undefined exception",
56 const std::string&
id =
"undefined",
57 const std::string& td =
"Generic ArgException")
77 std::string
argId()
const
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." ))
175 class SpecificationException :
public ArgException
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." ))
199 class ActionDoneException :
public std::runtime_error
203 std::runtime_error(text.c_str())
SpecificationException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.
std::string _typeDescription
Describes the type of the exception.
std::string _argId
The argument related to this exception.
std::string typeDescription() const
Returns the type of the exception.
std::string _errorText
The text of the exception message.
std::string error() const
Returns the error text.
ArgParseException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.
ArgException(const std::string &text="undefined exception", const std::string &id="undefined", const std::string &td="Generic ArgException")
Constructor.
CmdLineParseException(const std::string &text="undefined exception", const std::string &id="undefined")
Constructor.
A simple class that defines and argument exception.
std::string argId() const
Returns the argument id.
Thrown from CmdLine when the arguments on the command line are not properly specified,...
ActionDoneException(const std::string &text=std::string())
Thrown from within the child Arg classes when it fails to properly parse the argument it has been pas...
virtual ~ArgException()
Destructor.
const char * what() const
Returns the arg id and error text.
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 23:11:08 UTC 2019 | | |