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 ParametergetParameter () 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_
 
std::string message_
 

Detailed Description

The parameter exception base class.

See also
Exception

Definition at line 61 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 53 of file ParameterExceptions.cpp.

◆ ParameterException() [2/2]

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

Definition at line 77 of file ParameterExceptions.h.

◆ ~ParameterException()

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

Definition at line 88 of file ParameterExceptions.h.

Member Function Documentation

◆ getParameter()

const Parameter * ParameterException::getParameter ( ) const
virtual

Get the parameter that threw the exception.

Returns
A const pointer toward the parameter.

Definition at line 57 of file ParameterExceptions.cpp.

References parameter_.

◆ message()

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

Access the message as a std::string.

Definition at line 119 of file Exceptions.cpp.

References bpp::Exception::message_.

◆ operator=()

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

Definition at line 81 of file ParameterExceptions.h.

References parameter_.

◆ 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 118 of file Exceptions.cpp.

References bpp::Exception::message_.

Member Data Documentation

◆ message_

std::string bpp::Exception::message_
privateinherited

◆ parameter_

const Parameter* bpp::ParameterException::parameter_
private

Definition at line 65 of file ParameterExceptions.h.

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


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