aGrUM  0.16.0
gum::Exception Class Reference

Base class for all aGrUM's exceptions. More...

#include <exceptions.h>

+ Inheritance diagram for gum::Exception:

Public Member Functions

const std::string what () const
 
const std::string errorContent () const
 Returns the message content. More...
 
const std::string errorType () const
 Returns the error type. More...
 
const std::string errorCallStack () const
 Returns the error call stack. More...
 
Class constructors & destructors
 Exception (const std::string aMsg="", const std::string aType="Generic error")
 
 Exception (const Exception &e)
 
 ~Exception ()
 

Protected Attributes

std::string _msg
 
std::string _type
 
std::string _callstack
 

Detailed Description

Base class for all aGrUM's exceptions.

Definition at line 106 of file exceptions.h.

Constructor & Destructor Documentation

◆ Exception() [1/2]

gum::Exception::Exception ( const std::string  aMsg = "",
const std::string  aType = "Generic error" 
)

◆ Exception() [2/2]

gum::Exception::Exception ( const Exception e)

◆ ~Exception()

gum::Exception::~Exception ( )
inline

Definition at line 122 of file exceptions.h.

References _msg, and what().

122 {}
+ Here is the call graph for this function:

Member Function Documentation

◆ errorCallStack()

const std::string gum::Exception::errorCallStack ( ) const
inline

Returns the error call stack.

Returns
Returns the error call stack.

Definition at line 147 of file exceptions.h.

References _callstack.

147 { return _callstack; }
std::string _callstack
Definition: exceptions.h:110

◆ errorContent()

const std::string gum::Exception::errorContent ( ) const
inline

◆ errorType()

const std::string gum::Exception::errorType ( ) const
inline

Returns the error type.

Returns
Returns the error type.

Definition at line 141 of file exceptions.h.

References _type.

141 { return _type; }
std::string _type
Definition: exceptions.h:109

◆ what()

const std::string gum::Exception::what ( ) const
inline

Definition at line 128 of file exceptions.h.

References _msg.

Referenced by ~Exception().

128 { return "[pyAgrum] " + _type + " : " + _msg; }
std::string _type
Definition: exceptions.h:109
std::string _msg
Definition: exceptions.h:108
+ Here is the caller graph for this function:

Member Data Documentation

◆ _callstack

std::string gum::Exception::_callstack
protected

Definition at line 110 of file exceptions.h.

Referenced by errorCallStack().

◆ _msg

std::string gum::Exception::_msg
protected

Definition at line 108 of file exceptions.h.

Referenced by errorContent(), what(), and ~Exception().

◆ _type

std::string gum::Exception::_type
protected

Definition at line 109 of file exceptions.h.

Referenced by errorType().


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