Celeritas
0.5.0-56+6b053cd
|
Translate Celeritas C++ exceptions into Geant4 G4Exception calls. More...
#include <ExceptionConverter.hh>
Public Member Functions | |
ExceptionConverter (char const *err_code, SharedParams const *params) | |
Construct with an error code and shared parameters. More... | |
ExceptionConverter (char const *err_code) | |
Construct with an error code for dispatching to Geant4. | |
void | operator() (std::exception_ptr p) const |
Capture the current exception and convert it to a G4Exception call. | |
Translate Celeritas C++ exceptions into Geant4 G4Exception calls.
This should generally be used when wrapping calls to Celeritas in a user application.
For example, the user event action to transport particles on device could be used as:
|
inline |
Construct with an error code and shared parameters.
The error code is reported to the Geant4 exception manager. The shared parameters are used to translate internal particle data if an exception occurs.