Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ExceptionHandler Class Reference

#include <G4ExceptionHandler.hh>

Inheritance diagram for G4ExceptionHandler:
Collaboration diagram for G4ExceptionHandler:

Public Member Functions

 G4ExceptionHandler ()
 
virtual ~G4ExceptionHandler ()
 
G4int operator== (const G4ExceptionHandler &right) const
 
G4int operator!= (const G4ExceptionHandler &right) const
 
virtual G4bool Notify (const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
 
- Public Member Functions inherited from G4VExceptionHandler
 G4VExceptionHandler ()
 
virtual ~G4VExceptionHandler ()
 
G4int operator== (const G4VExceptionHandler &right) const
 
G4int operator!= (const G4VExceptionHandler &right) const
 

Detailed Description

Definition at line 56 of file G4ExceptionHandler.hh.

Constructor & Destructor Documentation

G4ExceptionHandler::G4ExceptionHandler ( )

Definition at line 44 of file G4ExceptionHandler.cc.

45 {
46 }
G4ExceptionHandler::~G4ExceptionHandler ( )
virtual

Definition at line 48 of file G4ExceptionHandler.cc.

49 {
50 }

Member Function Documentation

G4bool G4ExceptionHandler::Notify ( const char *  originOfException,
const char *  exceptionCode,
G4ExceptionSeverity  severity,
const char *  description 
)
virtual

Implements G4VExceptionHandler.

Definition at line 72 of file G4ExceptionHandler.cc.

76 {
77  static const G4String es_banner
78  = "\n-------- EEEE ------- G4Exception-START -------- EEEE -------\n";
79  static const G4String ee_banner
80  = "\n-------- EEEE -------- G4Exception-END --------- EEEE -------\n";
81  static const G4String ws_banner
82  = "\n-------- WWWW ------- G4Exception-START -------- WWWW -------\n";
83  static const G4String we_banner
84  = "\n-------- WWWW -------- G4Exception-END --------- WWWW -------\n";
85  std::ostringstream message;
86  message << "*** G4Exception : " << exceptionCode << G4endl
87  << " issued by : " << originOfException << G4endl
88  << description << G4endl;
89  G4bool abortionForCoreDump = false;
91  switch(severity)
92  {
93  case FatalException:
94  G4cerr << es_banner << message.str() << "*** Fatal Exception *** core dump ***"
95  << ee_banner << G4endl;
96  abortionForCoreDump = true;
97  break;
99  G4cerr << es_banner << message.str() << "*** Fatal Error In Argument *** core dump ***"
100  << ee_banner << G4endl;
101  abortionForCoreDump = true;
102  break;
103  case RunMustBeAborted:
104  if(aps==G4State_GeomClosed || aps==G4State_EventProc)
105  {
106  G4cerr << es_banner << message.str() << "*** Run Must Be Aborted ***"
107  << ee_banner << G4endl;
109  }
110  abortionForCoreDump = false;
111  break;
112  case EventMustBeAborted:
113  if(aps==G4State_EventProc)
114  {
115  G4cerr << es_banner << message.str() << "*** Event Must Be Aborted ***"
116  << ee_banner << G4endl;
118  }
119  abortionForCoreDump = false;
120  break;
121  default:
122  G4cout << ws_banner << message.str() << "*** This is just a warning message. ***"
123  << we_banner << G4endl;
124  abortionForCoreDump = false;
125  break;
126  }
127  return abortionForCoreDump;
128 }
virtual void AbortRun(G4bool softAbort=false)
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
G4ApplicationState GetCurrentState() const
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61
virtual void AbortEvent()
G4ApplicationState
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

G4int G4ExceptionHandler::operator!= ( const G4ExceptionHandler right) const

Definition at line 67 of file G4ExceptionHandler.cc.

68 {
69  return (this != &right);
70 }
G4int G4ExceptionHandler::operator== ( const G4ExceptionHandler right) const

Definition at line 62 of file G4ExceptionHandler.cc.

63 {
64  return (this == &right);
65 }

The documentation for this class was generated from the following files: