EDepSimException.hh
Go to the documentation of this file.
1 #ifndef EDepSim_Exception_hh_seen
2 #define EDepSim_Exception_hh_seen
3 #include <EDepSimLog.hh>
4 #include <exception>
5 
6 /// The standard exception from detsim. This is usually thrown by the
7 /// EDepSimThrow macro.
8 namespace EDepSim {class Exception;}
10 public:
11  Exception() {}
12  virtual ~Exception() throw() {}
13  const char* what(void) const throw() {return "EDepSim::Exception";}
14 };
15 
16 /// Print an error message, and then throw an exception.
17 #define EDepSimThrow(message) {EDepSimError(message);throw EDepSim::Exception();}
18 #endif
Construct a module from components.
Definition: TG4HitSegment.h:10
const char * what(void) const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33