bpp-core3  3.0.0
bpp::Exception Class Reference

Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception) More...

#include <Bpp/Exceptions.h>

+ Inheritance diagram for bpp::Exception:
+ Collaboration diagram for bpp::Exception:

Public Member Functions

 Exception (std::string text, int stack=10)
 Build a new 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 message_
 

Detailed Description

Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)

Definition at line 58 of file Exceptions.h.

Constructor & Destructor Documentation

◆ Exception()

bpp::Exception::Exception ( std::string  text,
int  stack = 10 
)

Build a new Exception.

Parameters
textA message to be passed to the exception hierarchy.
stackdeep of the call stack

Definition at line 56 of file Exceptions.cpp.

References message_.

Member Function Documentation

◆ message()

const std::string & bpp::Exception::message ( ) const
noexcept

Access the message as a std::string.

Definition at line 119 of file Exceptions.cpp.

References message_.

◆ what()

const char * bpp::Exception::what ( ) const
overridenoexcept

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 message_.

Member Data Documentation

◆ message_

std::string bpp::Exception::message_
private

Definition at line 61 of file Exceptions.h.

Referenced by Exception(), message(), and what().


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