Exception is the base class for all exceptions to be used in ThePEG.
It is derived from
std::exception and adds information about the severity of the exception to indicate to the Repository and EventGenrator how to act on it.
To throw an exception one should inherit from
Exception and add information in the constructor of the base class. Alternatively one can use the
operator<< operator on a default constructed
Exception to add information as for a standard
ostream object, in which case one should always end with adding an enum of the type
Exception::Severity to indicate the severity of the exception e.g.
Exception() << "Something went wrong." << Exception::eventerror.
- See also
Definition at line 44 of file Exception.h.