TCLAP::ArgException Class Reference

A simple class that defines and argument exception. More...

`#include <ArgException.h>`

Inheritance diagram for TCLAP::ArgException:
[legend]
Collaboration diagram for TCLAP::ArgException:
[legend]

## Public Member Functions

| ArgException (const std::string &text="undefined exception", const std::string &id="undefined", const std::string &td="Generic ArgException")
| Constructor. More...
virtual | ~ArgException () throw ()
| Destructor. More...
std::string | error () const
| Returns the error text. More...
std::string | argId () const
| Returns the argument id. More...
const char * | what () const throw ()
| Returns the arg id and error text. More...
std::string | typeDescription () const
| Returns the type of the exception. More...

## Detailed Description

A simple class that defines and argument exception.

Should be caught whenever a CmdLine is created and parsed.

Definition at line 37 of file ArgException.h.

## Constructor & Destructor Documentation

## ArgException()

TCLAP::ArgException::ArgException | ( | const std::string & | text = `"undefined exception"`,
|  | const std::string & | id = `"undefined"`,
|  | const std::string & | td = `"Generic ArgException"`
| ) |  |

inline

Constructor.

Parameters

  text | - The text of the exception.
  id | - The text identifying the argument source.
  td | - Text describing the type of ArgException it is. of the exception.

Definition at line 48 of file ArgException.h.

## ~ArgException()

virtual TCLAP::ArgException::~ArgException | ( |  | ) |
throw | ( |
| ) |  |

inlinevirtual

Destructor.

Definition at line 60 of file ArgException.h.

## Member Function Documentation

## argId()

std::string TCLAP::ArgException::argId | ( |  | ) | const

inline

Returns the argument id.

Definition at line 70 of file ArgException.h.

Referenced by TCLAP::StdOutput::failure().

## error()

std::string TCLAP::ArgException::error | ( |  | ) | const

inline

Returns the error text.

Definition at line 65 of file ArgException.h.

Referenced by TCLAP::MultiArg< T >::_extractValue(), TCLAP::ValueArg< T >::_extractValue(), and TCLAP::StdOutput::failure().

## typeDescription()

std::string TCLAP::ArgException::typeDescription | ( |  | ) | const

inline

Returns the type of the exception.

Used to explain and distinguish between different child exceptions.

Definition at line 92 of file ArgException.h.

## what()

const char* TCLAP::ArgException::what | ( |  | ) | const
throw | ( |
| ) |  |

inline

Returns the arg id and error text.

Definition at line 81 of file ArgException.h.

Referenced by TCLAP::DocBookOutput::failure(), and TCLAP::ZshCompletionOutput::failure().

The documentation for this class was generated from the following file:

- ArgException.h