Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -33,6 +33,7 @@
#include <boost/python.hpp>
#include "G4VExceptionHandler.hh"
#include "G4StateManager.hh"
#include <stdlib.h>
using namespace boost::python;
@@ -52,43 +53,47 @@ public:
G4ExceptionSeverity severity,
const char* description) {
G4cerr << "*** G4Exception : " << exceptionCode << G4endl;
G4cerr << " issued by : " << originOfException << G4endl;
G4cerr << description << G4endl;
G4cerr << G4endl << "Severity : ";
std::ostringstream message;
message << "*** G4Exception : " << exceptionCode << G4endl
<< " issued by : " << originOfException << G4endl
<< description << G4endl;
switch(severity) {
case FatalException:
PyErr_SetString(PyExc_AssertionError,
"*** Fatal Exception ***");
PyErr_Print();
G4cerr << message.str() << G4endl;
break;
case FatalErrorInArgument:
PyErr_SetString(PyExc_ValueError,
"*** Fatal Error In Argument ***");
PyErr_Print();
G4cerr << message.str() << G4endl;
break;
case RunMustBeAborted:
PyErr_SetString(PyExc_RuntimeError,
"*** Run Must Be Aborted ***");
PyErr_Print();
G4cerr << message.str() << G4endl;
break;
case EventMustBeAborted:
PyErr_SetString(PyExc_RuntimeError,
"*** Event Must Be Aborted ***");
PyErr_Print();
G4cerr << message.str() << G4endl;
break;
default:
PyErr_Warn(PyExc_RuntimeWarning,
"*** This is just a warning message. ***");
G4cerr << message.str() << G4endl;
break;
}
G4cerr << G4endl;
// anyway, no abort.
return false;
}