aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::Exception Class Reference

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

#include <exceptions.h>

+ Inheritance diagram for gum::Exception:

Public Member Functions

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

Protected Attributes

std::string msg_
 
std::string type_
 
std::string callstack_
 

Detailed Description

Base class for all aGrUM's exceptions.

Definition at line 102 of file exceptions.h.

Constructor & Destructor Documentation

◆ Exception() [1/2]

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

◆ Exception() [2/2]

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

◆ ~Exception()

gum::Exception::~Exception ( )
default

Member Function Documentation

◆ errorCallStack()

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

Returns the error call stack.

Returns
Returns the error call stack.

Definition at line 142 of file exceptions.h.

142 { return callstack_; }
std::string callstack_
Definition: exceptions.h:106

◆ errorContent()

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

Returns the message content.

Returns
Returns the message content.

Definition at line 130 of file exceptions.h.

130 { return msg_; }
std::string msg_
Definition: exceptions.h:104

◆ errorType()

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

Returns the error type.

Returns
Returns the error type.

Definition at line 136 of file exceptions.h.

136 { return type_; }
std::string type_
Definition: exceptions.h:105

◆ what()

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

Definition at line 123 of file exceptions.h.

123 { return type_ + " : " + msg_; }
std::string type_
Definition: exceptions.h:105
std::string msg_
Definition: exceptions.h:104

Member Data Documentation

◆ callstack_

std::string gum::Exception::callstack_
protected

Definition at line 106 of file exceptions.h.

◆ msg_

std::string gum::Exception::msg_
protected

Definition at line 104 of file exceptions.h.

◆ type_

std::string gum::Exception::type_
protected

Definition at line 105 of file exceptions.h.


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