SimGrid  3.14.159
Versatile Simulation of Distributed Systems
simgrid::xbt::WithContextException Class Reference

Detailed Description

A base class for exceptions with context.

This is a base class for exceptions which store additional contextual infomations about them: backtrace, throw point, simulated process name and PID, etc.

You are not expected to inherit from it. Instead of you use should XBT_THROW an exception which will throw a subclass of your original exception with those additional features.

However, you can try dynamic_cast an exception to this type in order to get contextual information about the exception.

#include <exception.hpp>

Inheritance diagram for simgrid::xbt::WithContextException:
simgrid::xbt::WithContext< E > xbt_ex

Public Member Functions

 WithContextException ()
 
 WithContextException (Backtrace bt)
 
 WithContextException (ThrowPoint throwpoint, Backtrace bt)
 
virtual ~WithContextException ()
 
Backtrace const & backtrace () const
 
int pid () const
 
std::string const & processName () const
 
ThrowPointthrowPoint ()
 

Constructor & Destructor Documentation

◆ WithContextException() [1/3]

simgrid::xbt::WithContextException::WithContextException ( )
inline

◆ WithContextException() [2/3]

simgrid::xbt::WithContextException::WithContextException ( Backtrace  bt)
inline

◆ WithContextException() [3/3]

simgrid::xbt::WithContextException::WithContextException ( ThrowPoint  throwpoint,
Backtrace  bt 
)
inline

◆ ~WithContextException()

simgrid::xbt::WithContextException::~WithContextException ( )
virtualdefault

Member Function Documentation

◆ backtrace()

Backtrace const& simgrid::xbt::WithContextException::backtrace ( ) const
inline

◆ pid()

int simgrid::xbt::WithContextException::pid ( ) const
inline

◆ processName()

std::string const& simgrid::xbt::WithContextException::processName ( ) const
inline

◆ throwPoint()

ThrowPoint& simgrid::xbt::WithContextException::throwPoint ( )
inline

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