#include <ExceptionHandler.h>
Definition at line 9 of file ExceptionHandler.h.
ExceptionHandler::ExceptionHandler |
( |
RunManager * |
rm | ) |
|
ExceptionHandler::ExceptionHandler |
( |
| ) |
|
|
inline |
ExceptionHandler::~ExceptionHandler |
( |
| ) |
|
|
virtual |
bool ExceptionHandler::Notify |
( |
const char * |
exceptionOrigin, |
|
|
const char * |
exceptionCode, |
|
|
G4ExceptionSeverity |
severity, |
|
|
const char * |
description |
|
) |
| |
|
virtual |
Definition at line 23 of file ExceptionHandler.cc.
References RunManager::abortRun(), gather_cfg::cout, and fRunManager.
27 cout <<
"*** G4Exception : " << exceptionCode <<
" issued by " << exceptionOrigin << endl;
29 bool abortionForCoreDump =
false;
30 G4ApplicationState aps = G4StateManager::GetStateManager()->GetCurrentState();
34 if ( aps==G4State_EventProc && exceptionOrigin==
string(
"G4HadronicProcess") )
36 cout <<
"*** Fatal exception *** " << endl;
37 throw SimG4Exception(
"SimG4CoreApplication: Bug in G4HadronicProcess" ) ;
41 cout <<
"*** Fatal exception *** core dump ***" << endl;
42 abortionForCoreDump =
true;
49 case FatalErrorInArgument:
50 cout <<
"*** Fatal error in argument *** core dump ***" << endl;
51 abortionForCoreDump =
true;
53 case RunMustBeAborted:
54 if(aps==G4State_GeomClosed || aps==G4State_EventProc)
56 cout <<
"*** Run must be aborted " << endl;
60 abortionForCoreDump =
false;
62 case EventMustBeAborted:
63 if(aps==G4State_EventProc)
65 cout <<
"*** Event must be aborted " << endl;
93 throw SimG4Exception(
"SimG4CoreApplication: G4Navigator:StuckTrack detected" ) ;
95 abortionForCoreDump =
false;
98 cout <<
"*** This is just a warning message " << endl;
99 abortionForCoreDump =
false;
103 return abortionForCoreDump;
void abortRun(bool softAbort=false)