SimGrid  3.16
Versatile Simulation of Distributed Systems

Detailed Description

A legacy exception.

It is defined by a category and a value within that category (as well as an optional error message).

This used to be a structure for C exceptions but it has been retrofitted as a C++ exception and some of its data has been moved in the WithContextException base class. We should deprecate it and replace it with either C++ different exceptions or std::system_error which already provides this (category + error code) logic.

#include <ex.hpp>

Inheritance diagram for xbt_ex:
simgrid::xbt::WithContextException simgrid::xbt::WithContextException

Public Member Functions

 xbt_ex ()
 
 xbt_ex (simgrid::xbt::ThrowPoint throwpoint, const char *message)
 
 ~xbt_ex ()=default
 
 xbt_ex ()
 
 xbt_ex (simgrid::xbt::ThrowPoint throwpoint, const char *message)
 
 ~xbt_ex ()=default
 
- Public Member Functions inherited from simgrid::xbt::WithContextException
 WithContextException ()
 
 WithContextException (Backtrace bt)
 
 WithContextException (ThrowPoint throwpoint, Backtrace bt)
 
virtual ~WithContextException ()
 
Backtrace const & backtrace () const
 
int pid () const
 
std::string const & processName () const
 
ThrowPointthrowPoint ()
 
 WithContextException ()
 
 WithContextException (Backtrace bt)
 
 WithContextException (ThrowPoint throwpoint, Backtrace bt)
 
virtual ~WithContextException ()
 
Backtrace const & backtrace () const
 
int pid () const
 
std::string const & processName () const
 
ThrowPointthrowPoint ()
 

Public Attributes

xbt_errcat_t category = unknown_error
 Category (what went wrong) More...
 
int value = 0
 Why did it went wrong. More...
 

Constructor & Destructor Documentation

◆ xbt_ex() [1/4]

xbt_ex::xbt_ex ( )
inline

◆ xbt_ex() [2/4]

xbt_ex::xbt_ex ( simgrid::xbt::ThrowPoint  throwpoint,
const char *  message 
)
inline
Parameters
throwpointThrow point (use XBT_THROW_POINT)
messageException message

◆ ~xbt_ex() [1/2]

xbt_ex::~xbt_ex ( )
default

◆ xbt_ex() [3/4]

xbt_ex::xbt_ex ( )
inline

◆ xbt_ex() [4/4]

xbt_ex::xbt_ex ( simgrid::xbt::ThrowPoint  throwpoint,
const char *  message 
)
inline
Parameters
throwpointThrow point (use XBT_THROW_POINT)
messageException message

◆ ~xbt_ex() [2/2]

xbt_ex::~xbt_ex ( )
default

Member Data Documentation

◆ category

xbt_errcat_t xbt_ex::category = unknown_error

Category (what went wrong)

◆ value

int xbt_ex::value = 0

Why did it went wrong.


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