bpp-core3  3.0.0
bpp::ParameterNotFoundException Class Reference

Exception thrown when a parameter is not found, for instance in a ParameterList. More...

#include <Bpp/Numeric/ParameterExceptions.h>

+ Inheritance diagram for bpp::ParameterNotFoundException:
+ Collaboration diagram for bpp::ParameterNotFoundException:

Public Member Functions

 ParameterNotFoundException (const std::string &text, const std::string &param="")
 Build a new ParameterNotFoundException object. More...
 
virtual ~ParameterNotFoundException ()
 
virtual std::string getParameter () const
 Get the name of the parameter not found. 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 std::string parameter_
 
std::string message_
 

Detailed Description

Exception thrown when a parameter is not found, for instance in a ParameterList.

Definition at line 137 of file ParameterExceptions.h.

Constructor & Destructor Documentation

◆ ParameterNotFoundException()

ParameterNotFoundException::ParameterNotFoundException ( const std::string &  text,
const std::string &  param = "" 
)

Build a new ParameterNotFoundException object.

Parameters
textA message to be passed to the exception hierarchy.
paramThe name of the parameter not found.

Definition at line 70 of file ParameterExceptions.cpp.

◆ ~ParameterNotFoundException()

virtual bpp::ParameterNotFoundException::~ParameterNotFoundException ( )
inlinevirtual

Definition at line 152 of file ParameterExceptions.h.

Member Function Documentation

◆ getParameter()

std::string ParameterNotFoundException::getParameter ( ) const
virtual

Get the name of the parameter not found.

Returns
The parameter name.

Definition at line 74 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_.

◆ 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 std::string bpp::ParameterNotFoundException::parameter_
private

Definition at line 140 of file ParameterExceptions.h.

Referenced by getParameter().


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