bpp-core  2.2.0
bpp::NumberFormatException Class Reference

Number format exception. More...

#include <Bpp/Exceptions.h>

+ Inheritance diagram for bpp::NumberFormatException:
+ Collaboration diagram for bpp::NumberFormatException:

Public Member Functions

 NumberFormatException (const char *text, const std::string &badNumber)
 Build a new NumberFormatException. More...
 
 NumberFormatException (const std::string &text, const std::string &badNumber)
 Build a new NumberFormatException. More...
 
virtual ~NumberFormatException () throw ()
 
std::string 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

std::string badNumber_
 
std::string message_
 

Detailed Description

Number format exception.

Definition at line 257 of file Exceptions.h.

Constructor & Destructor Documentation

◆ NumberFormatException() [1/2]

NumberFormatException::NumberFormatException ( const char *  text,
const std::string &  badNumber 
)

Build a new NumberFormatException.

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

Definition at line 70 of file Exceptions.cpp.

◆ NumberFormatException() [2/2]

NumberFormatException::NumberFormatException ( const std::string &  text,
const std::string &  badNumber 
)

Build a new NumberFormatException.

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

Definition at line 74 of file Exceptions.cpp.

◆ ~NumberFormatException()

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

Definition at line 281 of file Exceptions.h.

Member Function Documentation

◆ getBadNumber()

std::string bpp::NumberFormatException::getBadNumber ( ) const
inline

Get the number that threw this exception.

Returns
The faulty number.

Definition at line 290 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_

std::string bpp::NumberFormatException::badNumber_
protected

Definition at line 261 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: