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.
bool operator<(const Exception &ex) const
Compare severity.
Exception & operator<<(Severity sev)
Set the severity for the exception.
virtual ~Exception()
The destructor.
void handle() const
Indicate that this exception has been taken care of.
bool handled
True if this exception has been taken care of.
const Exception & operator=(const Exception &ex)
Assignment.
void writeMessage(ostream &os=*errstream) const
Write the error message to a stream.
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.
virtual const char * what() const
Return the error message.
Exception & operator<<(const T &t)
Add info to the exception message.
Severity severity() const
Return the severity.
bool operator==(const Exception &ex) const
Comparison.
Severity theSeverity
The severity.
Severe error, (the run should be terminated).
Not severe (but the user should be informed).
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).
Possibly severe, (the event being generated should be discarded).
Severe error, (the run is aborted immediately, before the exception is thrown).
string message() const
Return the error message.