The base class for all exceptions, which is itself is based on std::exception.
More...
#include <ee/Exception.hpp>
|
| Exception (std::string caller, std::string message, std::vector< ee::Note > infos, OutputFormat format=OutputFormat::EASY_EXCEPTION_OUTPUT_FORMAT) noexcept |
| Constructor with caller and message. More...
|
|
Exception & | operator<< (const Note &info) noexcept |
| Reads an key-value-pair in and stores the values. More...
|
|
const char * | what () const noexceptoverride |
| The default method of every exception. More...
|
|
const std::string & | getMessage () const noexcept |
| Returns the message of this exception. More...
|
|
const std::string & | getCaller () const noexcept |
| Returns the caller of this exception. More...
|
|
const std::vector< Note > & | getNotes () const noexcept |
| Returns a list containing the notes. More...
|
|
const std::optional< std::shared_ptr< Stacktrace > > & | getStacktrace () const noexcept |
| Returns an optional that can contain a stacktrace. More...
|
|
const std::chrono::time_point< std::chrono::system_clock > & | getDateOfCreation () const noexcept |
| Returns the date of creation. More...
|
|
|
void | update () noexcept |
| Updates the cache.
|
|
|
OutputFormat | mFormat |
| Defines the output format of this exception.
|
|
std::string | mMessage |
| Holds the base message provided by the caller.
|
|
std::string | mCaller |
| Holds the caller.
|
|
std::vector< Note > | mInfos |
| Holds information stored by key-value pairs.
|
|
std::optional< std::shared_ptr< Stacktrace > > | mStacktrace |
| Holds the stacktrace.
|
|
std::chrono::time_point< std::chrono::system_clock > | mTimepoint |
| The date and time of the exception.
|
|
std::string | mCache |
| Caches the message for what().
|
|
The base class for all exceptions, which is itself is based on std::exception.
ee::Exception::Exception |
( |
std::string |
caller, |
|
|
std::string |
message, |
|
|
std::vector< ee::Note > |
infos, |
|
|
OutputFormat |
format = OutputFormat::EASY_EXCEPTION_OUTPUT_FORMAT |
|
) |
| |
|
explicitnoexcept |
Constructor with caller and message.
- Parameters
-
caller | The caller of this exception (typically PRETTY_FUNCTION). |
message | The message of this exception. |
infos | A list of infos |
const std::string& ee::Exception::getCaller |
( |
| ) |
const |
|
noexcept |
Returns the caller of this exception.
- Returns
- Caller of this exception.
const std::chrono::time_point<std::chrono::system_clock>& ee::Exception::getDateOfCreation |
( |
| ) |
const |
|
noexcept |
Returns the date of creation.
- Returns
- Date of creation.
const std::string& ee::Exception::getMessage |
( |
| ) |
const |
|
noexcept |
Returns the message of this exception.
- Returns
- Message of this exception.
const std::vector<Note>& ee::Exception::getNotes |
( |
| ) |
const |
|
noexcept |
Returns a list containing the notes.
- Returns
- List containing the notes of this exception.
const std::optional<std::shared_ptr<Stacktrace> >& ee::Exception::getStacktrace |
( |
| ) |
const |
|
noexcept |
Returns an optional that can contain a stacktrace.
- Returns
- An optional that can contain a stacktrace.
Reads an key-value-pair in and stores the values.
- Parameters
-
info | The info object that provides the information that will be stored. |
- Returns
- Reference to this.
const char* ee::Exception::what |
( |
| ) |
const |
|
overridenoexcept |
The default method of every exception.
- Returns
- A string representing the error message.
The documentation for this class was generated from the following file:
- /home/travis/build/pcbaecker/easy-exception/include/ee/Exception.hpp