SimGrid  3.14.159
Versatile Simulation of Distributed Systems

Detailed Description

Exceptions support.

Classes

class  simgrid::xbt::ThrowPoint
 The location of where an exception has been throwed. More...
 

Macros

#define XBT_THROW(e)   throw WithContext<E>(std::move(exception), throwpoint, simgrid::xbt::backtrace())
 Throw a C++ exception with some context. More...
 
#define XBT_THROW_NESTED(e)   std::throw_with_nested(WithContext<E>(std::move(exception), throwpoint, simgrid::xbt::backtrace()))
 Throw a C++ exception with a context and a nexted exception/cause. More...
 

Typedefs

typedef std::vector< xbt_backtrace_location_tsimgrid::xbt::Backtrace
 A backtrace. More...
 

Functions

void simgrid::xbt::logException (e_xbt_log_priority_t priority, const char *context, std::exception const &exception)
 Display informations about an exception. More...
 

Macro Definition Documentation

§ XBT_THROW

#define XBT_THROW (   e)    throw WithContext<E>(std::move(exception), throwpoint, simgrid::xbt::backtrace())

Throw a C++ exception with some context.

Parameters
eException to throw

§ XBT_THROW_NESTED

#define XBT_THROW_NESTED (   e)    std::throw_with_nested(WithContext<E>(std::move(exception), throwpoint, simgrid::xbt::backtrace()))

Throw a C++ exception with a context and a nexted exception/cause.

Parameters
eException to throw

Typedef Documentation

§ Backtrace

A backtrace.

This is used (among other things) in exceptions to store the associated backtrace.

Function Documentation

§ logException()

void simgrid::xbt::logException ( e_xbt_log_priority_t  priority,
const char *  context,
std::exception const &  exception 
)

Display informations about an exception.

We display: the exception type, name, attached backtraces (if any) and the nested exception (if any).