CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
ExceptionHandler Class Reference

#include <ExceptionHandler.h>

Inheritance diagram for ExceptionHandler:

Public Member Functions

 ExceptionHandler ()
 
bool Notify (const char *exceptionOrigin, const char *exceptionCode, G4ExceptionSeverity severity, const char *description) override
 
int operator!= (const ExceptionHandler &right) const
 
int operator== (const ExceptionHandler &right) const
 
 ~ExceptionHandler () override
 

Private Member Functions

 ExceptionHandler (const ExceptionHandler &)=delete
 
ExceptionHandleroperator= (const ExceptionHandler &right)=delete
 

Detailed Description

Definition at line 19 of file ExceptionHandler.h.

Constructor & Destructor Documentation

ExceptionHandler::ExceptionHandler ( )
explicit

Definition at line 9 of file ExceptionHandler.cc.

Referenced by operator!=().

10 {}
ExceptionHandler::~ExceptionHandler ( )
override

Definition at line 12 of file ExceptionHandler.cc.

13 {}
ExceptionHandler::ExceptionHandler ( const ExceptionHandler )
privatedelete

Member Function Documentation

bool ExceptionHandler::Notify ( const char *  exceptionOrigin,
const char *  exceptionCode,
G4ExceptionSeverity  severity,
const char *  description 
)
override

Definition at line 15 of file ExceptionHandler.cc.

References heppy_report::description.

Referenced by operator!=().

19 {
20  static const G4String es_banner
21  = "\n-------- EEEE ------- G4Exception-START -------- EEEE -------\n";
22  static const G4String ee_banner
23  = "\n-------- EEEE -------- G4Exception-END --------- EEEE -------\n";
24  static const G4String ws_banner
25  = "\n-------- WWWW ------- G4Exception-START -------- WWWW -------\n";
26  static const G4String we_banner
27  = "\n-------- WWWW -------- G4Exception-END --------- WWWW -------\n";
28 
29  std::stringstream message;
30  message << "*** G4Exception : " << exceptionCode << "\n"
31  << " issued by : " << exceptionOrigin << "\n"
32  << description;
33 
34  std::stringstream ss;
35  switch(severity) {
36 
37  case FatalException:
38  case FatalErrorInArgument:
39  case RunMustBeAborted:
40  case EventMustBeAborted:
41  ss << es_banner << message.str() << ee_banner;
42  throw SimG4Exception(ss.str());
43  break;
44 
45  case JustWarning:
46  edm::LogWarning("SimG4CoreApplication")
47  << ws_banner << message.str() << "*** This is just a warning message. ***"
48  << we_banner;
49  break;
50  }
51  return false;
52 }
int ExceptionHandler::operator!= ( const ExceptionHandler right) const
inline

Definition at line 26 of file ExceptionHandler.h.

References heppy_report::description, ExceptionHandler(), Notify(), operator=(), and ErrorSummaryFilter_cfi::severity.

26 { return (this != &right); }
ExceptionHandler& ExceptionHandler::operator= ( const ExceptionHandler right)
privatedelete

Referenced by operator!=().

int ExceptionHandler::operator== ( const ExceptionHandler right) const
inline

Definition at line 25 of file ExceptionHandler.h.

25 { return (this == &right); }