Celeritas  0.5.0-86+4a8eea4
List of all members
celeritas::ScopedGeantExceptionHandler Class Reference

Install and clear a Geant exception handler during this class lifetime. More...

#include <ScopedGeantExceptionHandler.hh>

Public Member Functions

 ScopedGeantExceptionHandler ()
 Install the Celeritas Geant4 exception handler. More...
 
 ~ScopedGeantExceptionHandler ()
 Revert to the previous exception handler.
 
 CELER_DELETE_COPY_MOVE (ScopedGeantExceptionHandler)
 

Detailed Description

Install and clear a Geant exception handler during this class lifetime.

Note that creating a G4RunManagerKernel resets the exception handler, so errors thrown during setup CANNOT be caught by Celeritas, and this class can only be used after creating the G4RunManager.

Note
This error is suitable only for single-threaded runs and multithreaded manager thread. The exceptions it throws will terminate a Geant4 worker thread.

Constructor & Destructor Documentation

◆ ScopedGeantExceptionHandler()

celeritas::ScopedGeantExceptionHandler::ScopedGeantExceptionHandler ( )
inline

Install the Celeritas Geant4 exception handler.

The base class of the exception handler calls SetExceptionHandler...

Do nothing if Geant4 is disabled (source file will not be compiled)

Member Function Documentation

◆ CELER_DELETE_COPY_MOVE()

celeritas::ScopedGeantExceptionHandler::CELER_DELETE_COPY_MOVE ( ScopedGeantExceptionHandler  )

Prevent copying and moving for RAII class


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