bpp-core3  3.0.0
bpp::BadNumberException Class Reference

Number exception: doubles. More...

#include <Bpp/Exceptions.h>

+ Inheritance diagram for bpp::BadNumberException:
+ Collaboration diagram for bpp::BadNumberException:

Public Member Functions

 BadNumberException (std::string text, double badNumber)
 Build a new BadNumberException. More...
 
double getBadNumber () const
 Get the number that threw this 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 badNumber_
 
std::string message_
 

Detailed Description

Number exception: doubles.

Definition at line 133 of file Exceptions.h.

Constructor & Destructor Documentation

◆ BadNumberException()

bpp::BadNumberException::BadNumberException ( std::string  text,
double  badNumber 
)

Build a new BadNumberException.

Parameters
textA message to be passed to the exception hierarchy.
badNumberThe faulty number.

Definition at line 139 of file Exceptions.cpp.

Member Function Documentation

◆ getBadNumber()

double bpp::BadNumberException::getBadNumber ( ) const

Get the number that threw this exception.

Returns
The faulty number.

Definition at line 143 of file Exceptions.cpp.

References badNumber_.

◆ 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

◆ badNumber_

double bpp::BadNumberException::badNumber_
private

Definition at line 136 of file Exceptions.h.

Referenced by getBadNumber().

◆ message_

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

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