9 #ifndef ThePEG_Exception_H 10 #define ThePEG_Exception_H 14 #include "ThePEG/Config/ThePEG.h" 15 #include "Exception.fh" 134 virtual const char*
what()
const throw() {
145 return mess.empty() ? string(
"Error message not provided.") : mess;
166 template <
typename T>
Exception(const Exception &ex)
The copy constructor.
Exception & operator<<(Severity sev)
Set the severity for the exception.
virtual ~Exception()
The destructor.
bool operator==(const Exception &ex) const
Comparison.
bool handled
True if this exception has been taken care of.
const Exception & operator=(const Exception &ex)
Assignment.
static bool noabort
If this flag is set, all abortnow and maybeabort severities will be treated as runerror.
Exception()
Default constructor.
static ostream * errstream
The default stream to write the error message if unhandled.
This is the main namespace within which all identifiers in ThePEG are declared.
Command failed during setup phase, execution is continued.
void writeMessage(ostream &os= *errstream) const
Write the error message to a stream.
Exception & operator<<(const T &t)
Add info to the exception message.
bool operator<(const Exception &ex) const
Compare severity.
Severity theSeverity
The severity.
Severe error, (the run should be terminated).
Not severe (but the user should be informed).
Severity severity() const
Return the severity.
void handle() const
Indicate that this exception has been taken care of.
Severity
The levels of severity.
ostringstream theMessage
Stream to write the error message to.
Severe error, (the run should be terminated, possibly dumping core).
Exception is the base class for all exceptions to be used in ThePEG.
Possibly severe, (the user should be warned).
string message() const
Return the error message.
virtual const char * what() const
Return the error message.
Possibly severe, (the event being generated should be discarded).
Severe error, (the run is aborted immediately, before the exception is thrown).