CMS 3D CMS Logo

List of all members | Public Member Functions
ExceptionHandler Class Reference

#include <ExceptionHandler.h>

Inheritance diagram for ExceptionHandler:

Public Member Functions

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

Detailed Description

Definition at line 19 of file ExceptionHandler.h.

Constructor & Destructor Documentation

◆ ExceptionHandler() [1/2]

ExceptionHandler::ExceptionHandler ( )
explicit

Definition at line 9 of file ExceptionHandler.cc.

9 {}

◆ ~ExceptionHandler()

ExceptionHandler::~ExceptionHandler ( )
override

Definition at line 11 of file ExceptionHandler.cc.

11 {}

◆ ExceptionHandler() [2/2]

ExceptionHandler::ExceptionHandler ( const ExceptionHandler )
delete

Member Function Documentation

◆ Notify()

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

Definition at line 13 of file ExceptionHandler.cc.

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

References edmLumisInFiles::description, HLT_2018_cff::severity, and contentValuesCheck::ss.

◆ operator!=()

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

Definition at line 25 of file ExceptionHandler.h.

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

◆ operator=()

ExceptionHandler& ExceptionHandler::operator= ( const ExceptionHandler right)
delete

◆ operator==()

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

Definition at line 24 of file ExceptionHandler.h.

24 { return (this == &right); }
edmLumisInFiles.description
description
Definition: edmLumisInFiles.py:11
SimG4Exception
Definition: SimG4Exception.h:13
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
edm::LogWarning
Definition: MessageLogger.h:141
HLT_2018_cff.severity
severity
Definition: HLT_2018_cff.py:48631