37 #ifndef G4EXCEPTION_HH
38 #define G4EXCEPTION_HH
49 return "\n-------- EEEE ------- G4Exception-START -------- EEEE -------\n";
53 return "\n-------- WWWW ------- G4Exception-START -------- WWWW -------\n";
58 return "\n-------- EEEE ------- G4Exception-END -------- EEEE -------\n";
62 return "\n-------- WWWW ------- G4Exception-END -------- WWWW -------\n";
66 const char* exceptionCode,
68 const char* description)
75 toBeAborted = exceptionHandler
76 ->
Notify(originOfException,exceptionCode,severity,description);
85 message <<
"\n*** ExceptionHandler is not defined ***\n"
86 <<
"*** G4Exception : " << exceptionCode <<
G4endl
87 <<
" issued by : " << originOfException <<
G4endl
92 G4cerr << es_banner << message.str() <<
"*** Fatal Exception ***"
96 G4cerr << es_banner << message.str() <<
"*** Fatal Error In Argument ***"
100 G4cerr << es_banner << message.str() <<
"*** Run Must Be Aborted ***"
104 G4cerr << es_banner << message.str() <<
"*** Event Must Be Aborted ***"
108 G4cout << ws_banner << message.str()
109 <<
"*** This is just a warning message. ***"
124 G4cerr <<
G4endl <<
"*** G4Exception: Abortion suppressed ***"
125 <<
G4endl <<
"*** No guarantee for further execution ***" <<
G4endl;
131 const char* exceptionCode,
136 G4Exception(originOfException, exceptionCode, severity, des.c_str());
140 const char* exceptionCode,
143 const char* comments)
145 description << comments <<
G4endl;
146 G4Exception(originOfException, exceptionCode, severity, description);
std::ostringstream G4ExceptionDescription
const G4String G4ExceptionWarnBannerStart()
G4VExceptionHandler * GetExceptionHandler() const
void message(RunManager *runmanager)
const G4String G4ExceptionErrBannerStart()
G4GLOB_DLL std::ostream G4cerr
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
virtual G4bool Notify(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)=0
const G4String G4ExceptionErrBannerEnd()
static G4StateManager * GetStateManager()
const G4String G4ExceptionWarnBannerEnd()