bpp-core3  3.0.0
bpp::ParameterException Class Reference

The parameter exception base class. More...

#include <Bpp/Numeric/ParameterExceptions.h>

+ Inheritance diagram for bpp::ParameterException:
+ Collaboration diagram for bpp::ParameterException:

Public Member Functions

 ParameterException (const std::string &text, const Parameter *param)
 Build a new ParameterException object. More...
 
 ParameterException (const ParameterException &pe)
 
ParameterExceptionoperator= (const ParameterException &pe)
 
virtual ~ParameterException ()
 
virtual const Parameterparameter () const
 Get the parameter that threw the exception. More...
 
const char * what () const noexcept override
 Method to get the message of the exception (STL method redefinition). More...
 
const std::string & message () const noexcept
 Access the message as a std::string. More...
 

Private Attributes

const Parameterparameter_
 

Detailed Description

The parameter exception base class.

See also
Exception

Definition at line 24 of file ParameterExceptions.h.

Constructor & Destructor Documentation

◆ ParameterException() [1/2]

ParameterException::ParameterException ( const std::string &  text,
const Parameter param 
)

Build a new ParameterException object.

Parameters
textA message to be passed to the exception hierarchy.
paramA const pointer toward the parameter that threw the exception.

Definition at line 16 of file ParameterExceptions.cpp.

◆ ParameterException() [2/2]

bpp::ParameterException::ParameterException ( const ParameterException pe)
inline

Definition at line 40 of file ParameterExceptions.h.

◆ ~ParameterException()

virtual bpp::ParameterException::~ParameterException ( )
inlinevirtual

Definition at line 51 of file ParameterExceptions.h.

References parameter().

Member Function Documentation

◆ message()

const std::string & bpp::Exception::message ( ) const
noexceptinherited

Access the message as a std::string.

Definition at line 79 of file Exceptions.cpp.

References bpp::Exception::message_.

◆ operator=()

ParameterException& bpp::ParameterException::operator= ( const ParameterException pe)
inline

Definition at line 44 of file ParameterExceptions.h.

References parameter_.

◆ parameter()

const Parameter * ParameterException::parameter ( ) const
virtual

Get the parameter that threw the exception.

Returns
A const pointer toward the parameter.

Definition at line 20 of file ParameterExceptions.cpp.

References parameter_.

Referenced by ~ParameterException(), and bpp::ParameterNotFoundException::~ParameterNotFoundException().

◆ what()

const char * bpp::Exception::what ( ) const
overridenoexceptinherited

Method to get the message of the exception (STL method redefinition).

Returns
The message passed to the exception hierarchy.

Definition at line 78 of file Exceptions.cpp.

References bpp::Exception::message_.

Member Data Documentation

◆ parameter_

const Parameter* bpp::ParameterException::parameter_
private

Definition at line 28 of file ParameterExceptions.h.

Referenced by operator=(), and parameter().


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