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_
 

Detailed Description

Out of range exception class.

Definition at line 170 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 129 of file Exceptions.cpp.

Member Function Documentation

◆ getBadValue()

double bpp::OutOfRangeException::getBadValue ( ) const

Definition at line 135 of file Exceptions.cpp.

References badValue_.

◆ getLowerBound()

double bpp::OutOfRangeException::getLowerBound ( ) const

Definition at line 136 of file Exceptions.cpp.

References bounds_.

◆ getUpperBound()

double bpp::OutOfRangeException::getUpperBound ( ) const

Definition at line 137 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 79 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 78 of file Exceptions.cpp.

References bpp::Exception::message_.

Member Data Documentation

◆ badValue_

double bpp::OutOfRangeException::badValue_
private

Definition at line 173 of file Exceptions.h.

Referenced by getBadValue().

◆ bounds_

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

Definition at line 174 of file Exceptions.h.

Referenced by getLowerBound(), and getUpperBound().


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