#include <include/CepGenPython/Error.h>
Public Types | |
enum struct | 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 | |
Error (const char *, const char *, short) noexcept | |
void | dump (std::ostream *=nullptr) const noexcept(true) override |
Human-readable dump of the exception. | |
const char * | what () const noexcept(true) override |
template<typename T > | |
const LoggedMessage & | log (T &&lambda) 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 occurred. | |
short | lineNumber () const |
Line number where the exception occurred. | |
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. | |
|
stronginherited |
|
stronginherited |
Enumerator | |
---|---|
undefined | Irregular message. |
error | General non-stopping error. |
fatal | Critical and stopping error. |
Definition at line 29 of file Exception.h.
|
explicitnoexcept |
|
overridevirtualnoexceptinherited |
Implements Message.
|
noexceptinherited |
|
staticinherited |
|
inherited |
|
overridenoexceptinherited |