bpp-core3  3.0.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 (std::string text, std::string badNumber)
 Build a new NumberFormatException. More...
 
const std::string & 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

std::string badNumber_
 
std::string message_
 

Detailed Description

Number format exception.

Definition at line 151 of file Exceptions.h.

Constructor & Destructor Documentation

◆ NumberFormatException()

bpp::NumberFormatException::NumberFormatException ( std::string  text,
std::string  badNumber 
)

Build a new NumberFormatException.

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

Definition at line 145 of file Exceptions.cpp.

Member Function Documentation

◆ getBadNumber()

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

Get the number that threw this exception.

Returns
The faulty number.

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

std::string bpp::NumberFormatException::badNumber_
private

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