CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::glob::Exception Class Reference

The class Exception. More...

#include <Exception.h>

Inherits std::exception.

Public Member Functions

Constructors/destructors
 Exception ()
 default constructor
 
 Exception (const std::string message, const ExitCode exitCode=ExitCode::_error_, const std::string header="\n", const std::string functionCBL=cbl::par::defaultString, const std::string fileCBL=cbl::par::defaultString)
 constructor More...
 
virtual ~Exception () noexcept=default
 default destructor
 
Functions to get the protected members of the class
const char * what () const noexcept override
 the error description More...
 
ExitCode exitCode () const noexcept
 get the exit status More...
 
std::string functionCBL () const noexcept
 get the CBL function where the exception is raised More...
 
std::string fileCBL () const noexcept
 get the CBL file containing the function where the exception is raised More...
 

Protected Attributes

std::string m_message
 the message describing the exception
 
ExitCode m_exitCode
 the exit status
 
std::string m_functionCBL
 the CBL function where the exception is raised
 
std::string m_fileCBL
 the CBL file containing the function where the exception is raised
 

Detailed Description

Constructor & Destructor Documentation

◆ Exception()

cbl::glob::Exception::Exception ( const std::string  message,
const ExitCode  exitCode = ExitCode::_error_,
const std::string  header = "\n",
const std::string  functionCBL = cbl::par::defaultString,
const std::string  fileCBL = cbl::par::defaultString 
)
inlineexplicit

constructor

Parameters
messagethe output message
exitCodethe exit status
headerheader of the error message
functionCBLthe CBL function where the exception is raised
fileCBLthe CBL file containing the function where the exception is raised

Definition at line 156 of file Exception.h.

Member Function Documentation

◆ exitCode()

ExitCode cbl::glob::Exception::exitCode ( ) const
inlinenoexcept

get the exit status

Returns
the exit status

Definition at line 210 of file Exception.h.

◆ fileCBL()

std::string cbl::glob::Exception::fileCBL ( ) const
inlinenoexcept

get the CBL file containing the function where the exception is raised

Returns
the CBL function where the exception is raised

Definition at line 227 of file Exception.h.

◆ functionCBL()

std::string cbl::glob::Exception::functionCBL ( ) const
inlinenoexcept

get the CBL function where the exception is raised

Returns
the CBL function where the exception is raised

Definition at line 218 of file Exception.h.

◆ what()


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