Design Pattern Examples
Overview of object-oriented design patterns
argumentinvalid_error Class Reference

Exception for arguments that are invalid. More...

#include <argumentinvalid_error.h>

Inheritance diagram for argumentinvalid_error:
Inheritance graph
Collaboration diagram for argumentinvalid_error:
Collaboration graph

Public Member Functions

 argumentinvalid_error (const std::string &parm, const std::string &what_arg)
 Constructor.
 
 argumentinvalid_error (const char *parm, const char *what_arg)
 Constructor.
 
std::string parameter ()
 Retrieve the parameter associated with the exception.
 

Private Attributes

std::string _parameter
 

Detailed Description

Exception for arguments that are invalid.

Definition at line 19 of file argumentinvalid_error.h.

Constructor & Destructor Documentation

◆ argumentinvalid_error() [1/2]

argumentinvalid_error ( const std::string &  parm,
const std::string &  what_arg 
)
inline

Constructor.

Parameters
parmThe parameter that was invalid.
what_argSpecific message indicating the problem.

Definition at line 29 of file argumentinvalid_error.h.

◆ argumentinvalid_error() [2/2]

argumentinvalid_error ( const char *  parm,
const char *  what_arg 
)
inline

Constructor.

Parameters
parmThe parameter that was invalid.
what_argSpecific message indicating the problem.

Definition at line 40 of file argumentinvalid_error.h.

Member Function Documentation

◆ parameter()

std::string parameter ( )
inline

Retrieve the parameter associated with the exception.

Returns
Returns a string containing the name of the parameter.

Definition at line 50 of file argumentinvalid_error.h.

References argumentinvalid_error::_parameter.

Member Data Documentation

◆ _parameter

std::string _parameter
private

Definition at line 22 of file argumentinvalid_error.h.

Referenced by argumentinvalid_error::parameter().


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