pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
pflib::Exception Class Reference

PFlib. More...

Inheritance diagram for pflib::Exception:
[legend]
Collaboration diagram for pflib::Exception:
[legend]

Public Member Functions

 Exception () throw ()
 Empty constructor. More...
 
 Exception (const std::string &name, const std::string &message, const std::string &module, int line, const std::string &function)
 Class constructor. More...
 
virtual ~Exception () throw ()
 Class destructor.
 
const std::stringname () const throw ()
 Get the name of the exception. More...
 
const std::stringmessage () const throw ()
 Get the message of the exception. More...
 
const std::stringmodule () const throw ()
 Get the source filename where the exception occurred. More...
 
const std::stringfunction () const throw ()
 Get the function name where the exception occurred. More...
 
int line () const throw ()
 Get the source line number where the exception occurred. More...
 
virtual const char * what () const throw ()
 The error message. More...
 
- Public Member Functions inherited from std::exception
what (T... args)
 
~exception (T... args)
 
operator= (T... args)
 
exception (T... args)
 

Private Attributes

std::string name_
 Exception name.
 
std::string message_
 Error message.
 
std::string module_
 Source filename where the exception occurred.
 
std::string function_
 Function name where the exception occurred.
 
int line_ {0}
 Source line number where the exception occurred.
 

Detailed Description

PFlib.

Constructor & Destructor Documentation

◆ Exception() [1/2]

pflib::Exception::Exception ( )
throw (
)
inline

Empty constructor.

Don't build stack trace for empty exceptions.

◆ Exception() [2/2]

pflib::Exception::Exception ( const std::string name,
const std::string message,
const std::string module,
int  line,
const std::string function 
)
inline

Class constructor.

Parameters
nameName of the exception.
messageExtended message describing the exception.
moduleFilename in the source code where the exception occurred.
lineLine in the source code where the exception occurred.
functionFunction in which the exception occurred.

Member Function Documentation

◆ function()

const std::string & pflib::Exception::function ( ) const
throw (
)
inline

Get the function name where the exception occurred.

Returns
The function name where the exception occurred.

◆ line()

int pflib::Exception::line ( ) const
throw (
)
inline

Get the source line number where the exception occurred.

Returns
The source line number where the exception occurred.

◆ message()

const std::string & pflib::Exception::message ( ) const
throw (
)
inline

Get the message of the exception.

Returns
The message of the exception.

◆ module()

const std::string & pflib::Exception::module ( ) const
throw (
)
inline

Get the source filename where the exception occurred.

Returns
The source filename where the exception occurred.

◆ name()

const std::string & pflib::Exception::name ( ) const
throw (
)
inline

Get the name of the exception.

Returns
The name of the exception.

◆ what()

virtual const char * pflib::Exception::what ( ) const
throw (
)
inlinevirtual

The error message.

Returns
The error message.

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