Definition at line 42 of file pyG4ExceptionHandler.cc.
PyG4ExceptionHandler::PyG4ExceptionHandler |
( |
| ) |
|
|
inline |
Definition at line 44 of file pyG4ExceptionHandler.cc.
44 :G4VExceptionHandler() {
45 G4StateManager* sm= G4StateManager::GetStateManager();
46 sm-> SetExceptionHandler(
this);
PyG4ExceptionHandler::~PyG4ExceptionHandler |
( |
| ) |
|
|
inline |
G4bool PyG4ExceptionHandler::Notify |
( |
const char * |
originOfException, |
|
|
const char * |
exceptionCode, |
|
|
G4ExceptionSeverity |
severity, |
|
|
const char * |
description |
|
) |
| |
|
inline |
Definition at line 50 of file pyG4ExceptionHandler.cc.
55 std::ostringstream message;
56 message <<
"*** G4Exception : " << exceptionCode << G4endl
57 <<
" issued by : " << originOfException << G4endl
58 << description << G4endl;
62 PyErr_SetString(PyExc_AssertionError,
63 "*** Fatal Exception ***");
65 G4cerr << message.str() << G4endl;
68 case FatalErrorInArgument:
69 PyErr_SetString(PyExc_ValueError,
70 "*** Fatal Error In Argument ***");
72 G4cerr << message.str() << G4endl;
75 case RunMustBeAborted:
76 PyErr_SetString(PyExc_RuntimeError,
77 "*** Run Must Be Aborted ***");
79 G4cerr << message.str() << G4endl;
82 case EventMustBeAborted:
83 PyErr_SetString(PyExc_RuntimeError,
84 "*** Event Must Be Aborted ***");
86 G4cerr << message.str() << G4endl;
90 PyErr_Warn(PyExc_RuntimeWarning,
91 "*** This is just a warning message. ***");
92 G4cerr << message.str() << G4endl;
The documentation for this class was generated from the following file: