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 8 of file ExceptionHandler.cc.

Referenced by operator!=().

9 {}
ExceptionHandler::~ExceptionHandler ( )
override

Definition at line 11 of file ExceptionHandler.cc.

12 {}
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 14 of file ExceptionHandler.cc.

References heppy_report::description.

Referenced by operator!=().

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