CepGen 1.2.5
Central exclusive processes event generator
|
#include <CepGen/Core/Exception.h>
Public Types | |
enum | Type { undefined = -1 , error , fatal } |
Enumeration of exception severities. More... | |
enum class | MessageType { undefined = -1 , debug , verbatim , info , warning } |
Enumeration of message type. More... | |
Public Member Functions | |
Exception (const char *mod, const char *from="", Type type=Type::undefined, const char *file="", short lineno=0) noexcept | |
virtual | ~Exception () noexcept override |
Destructor (potentially killing the process) | |
void | dump (std::ostream *os=nullptr) const noexcept override |
Human-readable dump of the exception. | |
const char * | what () const noexcept override |
template<typename T > | |
const LoggedMessage & | log (T &&lam) noexcept |
Lambda function handler. | |
std::string | message () const |
Human-readable message. | |
const std::string & | from () const |
Origin of the exception. | |
const std::string & | file () const |
File where the exception occured. | |
short | lineNumber () const |
Line number where the exception occured. | |
const MessageType & | type () const |
Message type. | |
std::ostream & | stream () |
Output stream object. | |
Static Public Member Functions | |
static std::string | now () |
Human-readable date/time. | |
Protected Attributes | |
std::ostringstream | message_ |
Message to throw. | |
std::string | from_ |
Origin of the exception. | |
std::string | file_ |
File. | |
short | line_num_ |
Line number. | |
Friends | |
std::ostream & | operator<< (std::ostream &, const Type &) |
Printout operator for exception type. | |
template<typename T > | |
const Exception & | operator<< (const Exception &exc, const T &var) noexcept |
Definition at line 25 of file Exception.h.
|
stronginherited |
enum Type |
Enumerator | |
---|---|
undefined | Irregular message. |
error | General non-stopping error. |
fatal | Critical and stopping error. |
Definition at line 28 of file Exception.h.
|
explicitnoexcept |
Definition at line 25 of file Exception.cpp.
|
overridevirtualnoexcept |
Definition at line 30 of file Exception.cpp.
|
overridevirtualnoexcept |
Implements Message.
Definition at line 41 of file Exception.cpp.
|
noexceptinherited |
|
staticinherited |
Definition at line 23 of file Message.cpp.
|
inherited |
|
overridenoexcept |
Definition at line 36 of file Exception.cpp.
Definition at line 45 of file Exception.h.
|
friend |
Definition at line 59 of file Exception.cpp.