bpp-core3  3.0.0
bpp::OutOfRangeException Class Reference

Out of range exception class. More...

#include <Bpp/Exceptions.h>

+ Inheritance diagram for bpp::OutOfRangeException:
+ Collaboration diagram for bpp::OutOfRangeException:

Public Member Functions

 OutOfRangeException (std::string text, double badValue, double lowerBound, double upperBound)
 Build a new OutOfRangeException. More...
 
double getBadValue () const
 
double getLowerBound () const
 
double getUpperBound () const
 
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_
 
std::array< double, 2 > bounds_
 
std::string message_
 

Detailed Description

Out of range exception class.

Definition at line 208 of file Exceptions.h.

Constructor & Destructor Documentation

◆ OutOfRangeException()

bpp::OutOfRangeException::OutOfRangeException ( std::string  text,
double  badValue,
double  lowerBound,
double  upperBound 
)

Build a new OutOfRangeException.

Parameters
textA message to be passed to the exception hierarchy.
badValueThe faulty value.
lowerBoundLower limit.
upperBoundUpper limit.

Definition at line 169 of file Exceptions.cpp.

Member Function Documentation

◆ getBadValue()

double bpp::OutOfRangeException::getBadValue ( ) const

Definition at line 175 of file Exceptions.cpp.

References badValue_.

◆ getLowerBound()

double bpp::OutOfRangeException::getLowerBound ( ) const

Definition at line 176 of file Exceptions.cpp.

References bounds_.

◆ getUpperBound()

double bpp::OutOfRangeException::getUpperBound ( ) const

Definition at line 177 of file Exceptions.cpp.

References bounds_.

◆ 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

◆ badValue_

double bpp::OutOfRangeException::badValue_
private

Definition at line 211 of file Exceptions.h.

Referenced by getBadValue().

◆ bounds_

std::array<double, 2> bpp::OutOfRangeException::bounds_
private

Definition at line 212 of file Exceptions.h.

Referenced by getLowerBound(), and getUpperBound().

◆ message_

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

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