TAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Attributes | List of all members
TAP::argument_error Class Reference

Exception class raised when an error occurs verifying a command line argument. More...

#include <Exceptions.hpp>

Inheritance diagram for TAP::argument_error:
TAP::exception TAP::argument_count_mismatch TAP::argument_invalid_value TAP::argument_missing_value TAP::argument_no_value

Public Member Functions

 argument_error (const Argument &arg)
 Creates the exception for the given argument, without a specified reason. More...
 
 argument_error (const Argument &arg, const std::string &reason)
 Creates the exception for the given argument, with a specified reason. More...
 
const Argumentarg () const
 Returns the argument triggering the error. More...
 
- Public Member Functions inherited from TAP::exception
 exception (std::string what)
 Creates the exception with the given message. More...
 
 exception ()
 Creates the exception with no message.
 
const char * what () const noexceptoverride
 See std::exception::what().
 

Protected Attributes

std::unique_ptr< Argumentm_arg
 Copy of the argument involved in the error.
 
- Protected Attributes inherited from TAP::exception
std::string m_what
 Description of the exception. More...
 

Detailed Description

Exception class raised when an error occurs verifying a command line argument.

Constructor & Destructor Documentation

TAP::argument_error::argument_error ( const Argument arg)

Creates the exception for the given argument, without a specified reason.

Parameters
argThe argument with an error
TAP::argument_error::argument_error ( const Argument arg,
const std::string &  reason 
)

Creates the exception for the given argument, with a specified reason.

Parameters
argThe argument with an error
reasonThe reason of the error

Member Function Documentation

const Argument& TAP::argument_error::arg ( ) const
inline

Returns the argument triggering the error.

Returns
The argument triggering the error

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