Public Member Functions | Private Attributes | List of all members
ecl::ArgException Class Reference

Defines the exception that is thrown whenever a command line is created and parsed. More...

#include <arg_exception.hpp>

Inheritance diagram for ecl::ArgException:
Inheritance graph
[legend]

Public Member Functions

 ArgException (const std::string &text="undefined exception", const std::string &id="undefined", const std::string &td="Generic ArgException")
 
std::string argId () const
 
std::string error () const
 
std::string typeDescription () const
 
const char * what () const throw ()
 
virtual ~ArgException () throw ()
 

Private Attributes

std::string _argId
 
std::string _errorText
 
std::string _typeDescription
 

Detailed Description

Defines the exception that is thrown whenever a command line is created and parsed.

A simple class that defines an argument exception. Should be caught whenever a CmdLine is created and parsed.

Definition at line 32 of file arg_exception.hpp.

Constructor & Destructor Documentation

◆ ArgException()

ecl::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 45 of file arg_exception.hpp.

◆ ~ArgException()

virtual ecl::ArgException::~ArgException ( )
throw (
)
inlinevirtual

Destructor.

Definition at line 57 of file arg_exception.hpp.

Member Function Documentation

◆ argId()

std::string ecl::ArgException::argId ( ) const
inline

Returns the argument id.

Definition at line 67 of file arg_exception.hpp.

◆ error()

std::string ecl::ArgException::error ( ) const
inline

Returns the error text.

Definition at line 62 of file arg_exception.hpp.

◆ typeDescription()

std::string ecl::ArgException::typeDescription ( ) const
inline

Returns the type of the exception. Used to explain and distinguish between different child exceptions.

Definition at line 89 of file arg_exception.hpp.

◆ what()

const char* ecl::ArgException::what ( ) const
throw (
)
inline

Returns the arg id and error text.

Definition at line 78 of file arg_exception.hpp.

Member Data Documentation

◆ _argId

std::string ecl::ArgException::_argId
private

The argument related to this exception.

Definition at line 105 of file arg_exception.hpp.

◆ _errorText

std::string ecl::ArgException::_errorText
private

The text of the exception message.

Definition at line 100 of file arg_exception.hpp.

◆ _typeDescription

std::string ecl::ArgException::_typeDescription
private

Describes the type of the exception. Used to distinguish between different child exceptions.

Definition at line 111 of file arg_exception.hpp.


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


ecl_command_line
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:13