bpp-core  2.2.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 (const char *text, double badNumber)
 Build a new BadNumberException. More...
 
 BadNumberException (const std::string &text, double badNumber)
 Build a new BadNumberException. More...
 
virtual ~BadNumberException () throw ()
 
double getBadNumber () const
 Get the number that threw this exception. More...
 
const char * what () const throw ()
 Method to get the message of the exception (STL method redefinition). More...
 

Protected Attributes

double badNumber_
 
std::string message_
 

Detailed Description

Number exception: doubles.

Definition at line 216 of file Exceptions.h.

Constructor & Destructor Documentation

◆ BadNumberException() [1/2]

BadNumberException::BadNumberException ( const char *  text,
double  badNumber 
)

Build a new BadNumberException.

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

Definition at line 60 of file Exceptions.cpp.

◆ BadNumberException() [2/2]

BadNumberException::BadNumberException ( const 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 64 of file Exceptions.cpp.

◆ ~BadNumberException()

virtual bpp::BadNumberException::~BadNumberException ( )
throw (
)
inlinevirtual

Definition at line 240 of file Exceptions.h.

Member Function Documentation

◆ getBadNumber()

double bpp::BadNumberException::getBadNumber ( ) const
inline

Get the number that threw this exception.

Returns
The faulty number.

Definition at line 249 of file Exceptions.h.

References badNumber_.

◆ what()

const char* bpp::Exception::what ( ) const
throw (
)
inlineinherited

Method to get the message of the exception (STL method redefinition).

Returns
The message passed to the exception hierarchy.

Definition at line 87 of file Exceptions.h.

References bpp::Exception::message_.

Member Data Documentation

◆ badNumber_

double bpp::BadNumberException::badNumber_
protected

Definition at line 220 of file Exceptions.h.

Referenced by getBadNumber().

◆ message_

std::string bpp::Exception::message_
protectedinherited

Definition at line 61 of file Exceptions.h.

Referenced by bpp::Exception::what().


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