Elements
6.2
A C++ base framework for the Euclid Software.
|
Elements base exception class. More...
#include <Exception.h>
Classes | |
struct | ExitCodeHelper |
struct | ExitCodeHelper< First, Rest... > |
struct | ExitCodeHelper< Last > |
Public Member Functions | |
Exception (ExitCode e=ExitCode::NOT_OK) | |
Exception (const char *message, ExitCode e=ExitCode::NOT_OK) | |
Exception (const std::string &message, ExitCode e=ExitCode::NOT_OK) | |
template<typename... Args> | |
Exception (const char *stringFormat, Args &&... args) | |
Constructs a new Exception with a message using format specifiers. More... | |
virtual | ~Exception () noexcept=default |
const char * | what () const noexcept override |
ExitCode | exitCode () const noexcept |
template<typename T > | |
void | appendMessage (const T &message) |
Appends in the end of the exception message the parameter. More... | |
Public Member Functions inherited from std::exception | |
T | what (T... args) |
T | ~exception (T... args) |
T | operator= (T... args) |
T | exception (T... args) |
Protected Attributes | |
std::string | m_error_msg {} |
const ExitCode | m_exit_code {ExitCode::NOT_OK} |
Elements base exception class.
Definition at line 47 of file Exception.h.
|
inlineexplicit |
Default constructor. The message is set to the empty string.
e | this is an optional exit code. By default is is set to NOT_OK. |
Definition at line 54 of file Exception.h.
References Elements::Kernel::Units::e.
|
inlineexplicit |
Constructor (C strings).
message | C-style string error message. The string contents are copied upon construction. Hence, responsibility for deleting the char* lies with the caller. |
e | this is an optional exit code. By default is is set to NOT_OK. |
Definition at line 64 of file Exception.h.
References Elements::Kernel::Units::e.
|
inlineexplicit |
Constructor (C++ STL strings).
message | The error message. |
e | this is an optional exit code. By default is is set to NOT_OK. |
Definition at line 71 of file Exception.h.
References Elements::Kernel::Units::e.
|
inlineexplicit |
Constructs a new Exception with a message using format specifiers.
stringFormat | The message containing the format specifiers |
args | The values to replace the format specifiers with |
Definition at line 81 of file Exception.h.
|
virtualdefaultnoexcept |
Virtual destructor.
|
inline |
Appends in the end of the exception message the parameter.
The passed parameters can be of any type the << operator of the std::stringstream can handle.
message | The message to append |
Definition at line 118 of file Exception.h.
References std::stringstream::str().
|
inlinenoexcept |
Return the exit code of the Exception
Definition at line 106 of file Exception.h.
Referenced by Elements::ProgramManager::onTerminate().
|
inlineoverridenoexcept |
Returns a pointer to the (constant) error description.
Definition at line 98 of file Exception.h.
Referenced by Elements::ProgramManager::onTerminate().
|
protected |
Error message.
Definition at line 127 of file Exception.h.
|
protected |
Definition at line 128 of file Exception.h.