bpp-core3  3.0.0
bpp::BadIntegerException Class Reference

Number exception: integers. More...

#include <Bpp/Exceptions.h>

+ Inheritance diagram for bpp::BadIntegerException:
+ Collaboration diagram for bpp::BadIntegerException:

Public Member Functions

 BadIntegerException (std::string text, int badInt)
 Build a new BadIntegerException. More...
 
int getBadInteger () const
 Get the integer 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

int badInt_
 

Detailed Description

Number exception: integers.

Definition at line 77 of file Exceptions.h.

Constructor & Destructor Documentation

◆ BadIntegerException()

bpp::BadIntegerException::BadIntegerException ( std::string  text,
int  badInt 
)

Build a new BadIntegerException.

Parameters
textA message to be passed to the exception hierarchy.
badIntThe faulty integer.

Definition at line 93 of file Exceptions.cpp.

Member Function Documentation

◆ getBadInteger()

int bpp::BadIntegerException::getBadInteger ( ) const

Get the integer that threw this exception.

Returns
The faulty integer.

Definition at line 97 of file Exceptions.cpp.

References badInt_.

◆ 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

◆ badInt_

int bpp::BadIntegerException::badInt_
private

Definition at line 80 of file Exceptions.h.

Referenced by getBadInteger().


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