bpp-core3
3.0.0
|
Exception thrown when a value do not match a given constraint. More...
#include <Bpp/Numeric/ParameterExceptions.h>
Public Member Functions | |
ConstraintException (const std::string &text, const Parameter *param, double badValue) | |
Build a new ConstraintException object. More... | |
virtual | ~ConstraintException () |
virtual double | getBadValue () const |
Get the value that doesn't match the constraint. More... | |
virtual const Parameter * | parameter () 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 | |
double | badValue_ |
Exception thrown when a value do not match a given constraint.
Definition at line 67 of file ParameterExceptions.h.
ConstraintException::ConstraintException | ( | const std::string & | text, |
const Parameter * | param, | ||
double | badValue | ||
) |
Build a new ConstraintException object.
text | A message to be passed to the exception hierarchy. |
param | A const pointer toward the parameter that threw the exception. |
badValue | The value that doesn't match the constraint. |
Definition at line 24 of file ParameterExceptions.cpp.
|
inlinevirtual |
Definition at line 83 of file ParameterExceptions.h.
|
virtual |
Get the value that doesn't match the constraint.
Definition at line 29 of file ParameterExceptions.cpp.
References badValue_.
Referenced by bpp::AutoParameter::setValue().
|
noexceptinherited |
Access the message as a std::string.
Definition at line 79 of file Exceptions.cpp.
References bpp::Exception::message_.
|
virtualinherited |
Get the parameter that threw the exception.
Definition at line 20 of file ParameterExceptions.cpp.
References bpp::ParameterException::parameter_.
Referenced by bpp::ParameterException::~ParameterException(), and bpp::ParameterNotFoundException::~ParameterNotFoundException().
|
overridenoexceptinherited |
Method to get the message of the exception (STL method redefinition).
Definition at line 78 of file Exceptions.cpp.
References bpp::Exception::message_.
|
private |
Definition at line 70 of file ParameterExceptions.h.
Referenced by getBadValue().