aGrUM 3.1.1
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

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

Protected Attributes

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

Detailed Description

Base class for all aGrUM's exceptions.

Definition at line 122 of file exceptions.h.

Constructor & Destructor Documentation

◆ Exception() [1/2]

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

Referenced by Exception().

Here is the caller graph for this function:

◆ Exception() [2/2]

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

References Exception().

Here is the call graph for this function:

◆ ~Exception()

gum::Exception::~Exception ( )
overridedefault

References errorCallStack(), errorContent(), errorType(), and GUM_NODISCARD.

Here is the call graph for this function:

Member Function Documentation

◆ errorCallStack()

GUM_NODISCARD INLINE std::string gum::Exception::errorCallStack ( ) const

Returns the error call stack.

Returns
Returns the error call stack.

Definition at line 56 of file exceptions_inl.h.

56{ return callstack_; }
std::string callstack_
Definition exceptions.h:126

References callstack_, and GUM_NODISCARD.

Referenced by ~Exception().

Here is the caller graph for this function:

◆ errorContent()

GUM_NODISCARD INLINE std::string gum::Exception::errorContent ( ) const

Returns the message content.

Returns
Returns the message content.

Definition at line 52 of file exceptions_inl.h.

52{ return msg_; }
std::string msg_
Definition exceptions.h:124

References GUM_NODISCARD, and msg_.

Referenced by ~Exception(), gum::prm::o3prmr::O3prmrInterpreter::checkObserve(), gum::prm::o3prmr::O3prmrInterpreter::checkQuery(), gum::prm::o3prmr::O3prmrInterpreter::checkSemantic(), gum::prm::o3prmr::O3prmrInterpreter::checkUnobserve(), gum::prm::o3prmr::O3prmrInterpreter::import(), gum::prm::o3prmr::O3prmrInterpreter::interpret(), and gum::prm::o3prm::O3prmReader< GUM_SCALAR >::readFile().

Here is the caller graph for this function:

◆ errorType()

GUM_NODISCARD INLINE std::string gum::Exception::errorType ( ) const

Returns the error type.

Returns
Returns the error type.

Definition at line 54 of file exceptions_inl.h.

54{ return type_; }
std::string type_
Definition exceptions.h:125

References GUM_NODISCARD, and type_.

Referenced by ~Exception().

Here is the caller graph for this function:

◆ what()

GUM_NODISCARD INLINE const char * gum::Exception::what ( ) const
overridenoexcept

Definition at line 50 of file exceptions_inl.h.

50{ return what_.c_str(); }
std::string what_
Definition exceptions.h:127

References GUM_NODISCARD, and what_.

Member Data Documentation

◆ callstack_

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

Definition at line 126 of file exceptions.h.

Referenced by errorCallStack().

◆ msg_

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

Definition at line 124 of file exceptions.h.

Referenced by errorContent().

◆ type_

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

Definition at line 125 of file exceptions.h.

Referenced by errorType().

◆ what_

std::string gum::Exception::what_
protected

Definition at line 127 of file exceptions.h.

Referenced by what().


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