38 #include "G4String.hh"
42 const char* exceptionCode,
44 const char* description)
51 toBeAborted = exceptionHandler
52 ->
Notify(originOfException,exceptionCode,severity,description);
57 =
"\n-------- EEEE ------- G4Exception-START -------- EEEE -------\n";
59 =
"\n-------- EEEE -------- G4Exception-END --------- EEEE -------\n";
61 =
"\n-------- WWWW ------- G4Exception-START -------- WWWW -------\n";
63 =
"\n-------- WWWW -------- G4Exception-END --------- WWWW -------\n";
64 std::ostringstream message;
65 message <<
"\n*** ExceptionHandler is not defined ***\n"
66 <<
"*** G4Exception : " << exceptionCode <<
G4endl
67 <<
" issued by : " << originOfException <<
G4endl
72 G4cerr << es_banner << message.str() <<
"*** Fatal Exception ***"
76 G4cerr << es_banner << message.str() <<
"*** Fatal Error In Argument ***"
80 G4cerr << es_banner << message.str() <<
"*** Run Must Be Aborted ***"
84 G4cerr << es_banner << message.str() <<
"*** Event Must Be Aborted ***"
88 G4cout << ws_banner << message.str()
89 <<
"*** This is just a warning message. ***"
104 G4cerr <<
G4endl <<
"*** G4Exception: Abortion suppressed ***"
105 <<
G4endl <<
"*** No guarantee for further execution ***" <<
G4endl;
111 const char* exceptionCode,
116 G4Exception(originOfException, exceptionCode, severity, des.c_str());
120 const char* exceptionCode,
123 const char* comments)
125 description << comments <<
G4endl;
126 G4Exception(originOfException, exceptionCode, severity, description);
virtual G4bool Notify(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)=0
std::ostringstream G4ExceptionDescription
G4VExceptionHandler * GetExceptionHandler() const
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4GLOB_DLL std::ostream G4cerr