BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions
BDSExceptionHandler Class Reference

Handler that overrides Geant4's behaviour back to a normal exception. More...

#include <BDSExceptionHandler.hh>

Inheritance diagram for BDSExceptionHandler:
Inheritance graph
Collaboration diagram for BDSExceptionHandler:
Collaboration graph

Public Member Functions

 BDSExceptionHandler ()
 When called, the base class will register this object with G4StateManager. More...
 
virtual G4bool Notify (const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
 Virtual method to override behaviour. More...
 
 BDSExceptionHandler (const BDSExceptionHandler &)=delete
 As per G4 - delete these.
 
BDSExceptionHandleroperator= (const BDSExceptionHandler &)=delete
 As per G4 - delete these.
 

Detailed Description

Handler that overrides Geant4's behaviour back to a normal exception.

If left alone, Geant4 will use abort() which won't exit safely. Therefore, we use the exception handler they provide and change the behaviour to throwing one of our exceptions which we generally require to be caught.

Overall BDSIM can be expected to throw a BDSException or a std::exception.

Author
Laurie Nevay

Definition at line 36 of file BDSExceptionHandler.hh.

Constructor & Destructor Documentation

◆ BDSExceptionHandler()

BDSExceptionHandler::BDSExceptionHandler ( )

When called, the base class will register this object with G4StateManager.

Definition at line 23 of file BDSExceptionHandler.cc.

◆ ~BDSExceptionHandler()

BDSExceptionHandler::~BDSExceptionHandler ( )
virtual

Definition at line 26 of file BDSExceptionHandler.cc.

Member Function Documentation

◆ Notify()

G4bool BDSExceptionHandler::Notify ( const char *  originOfException,
const char *  exceptionCode,
G4ExceptionSeverity  severity,
const char *  description 
)
virtual

Virtual method to override behaviour.

Definition at line 29 of file BDSExceptionHandler.cc.


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