Celeritas  0.5.0-86+4a8eea4
Classes | Functions
LogContextException.hh File Reference
#include <exception>
This graph shows which files directly or indirectly include this file:

Classes

struct  celeritas::LogContextException
 Log an exception's context and optionally save to an output registry. More...
 

Functions

void celeritas::log_context_exception (std::exception_ptr p)
 Log any RichContextException and rethrow the embedded pointer. More...
 

Function Documentation

◆ log_context_exception()

void celeritas::log_context_exception ( std::exception_ptr  p)
inline

Log any RichContextException and rethrow the embedded pointer.

This is useful for unit tests and other situations where the nearest catch does not use std::rethrow_if_nested.

CELER_TRY_HANDLE(step(), log_context_exception);
#define CELER_TRY_HANDLE(STATEMENT, HANDLE_EXCEPTION)
"Try" to execute the statement, and "handle" all thrown errors by calling the given function-like err...
Definition: Macros.hh:189