An error class from which all PDI error are children.
More...
#include <error.h>
|
| virtual | ~Error () noexcept |
| virtual PDI_status_t | status () const noexcept=0 |
| | Gives access to the status of the error.
|
| virtual void | rethrow_with_context (std::string context) const =0 |
| | Rethrow the error with some context prepended to its description.
|
| virtual std::string | full_msg () const =0 |
| | Gives access to a full error message.
|
| template<typename... Args> |
| void | rethrow_with_context (fmt::format_string< Args... > format_str, Args &&... args) const |
| | Rethrow the error with some context prepended to its description.
|
An error class from which all PDI error are children.
Offers access to
- an error message (what) from std::exception
- an error code (status)
- a longer error message for verbose output (full_msg)
- the ability to be rethrown with added context (rethrow_with_context)
◆ ~Error()
| virtual PDI::Error::~Error |
( |
| ) |
|
|
virtualnoexcept |
◆ status()
Gives access to the status of the error.
- Returns
- the status of the error
◆ rethrow_with_context() [1/2]
| virtual void PDI::Error::rethrow_with_context |
( |
std::string | context | ) |
const |
|
pure virtual |
◆ full_msg()
| virtual std::string PDI::Error::full_msg |
( |
| ) |
const |
|
pure virtual |
Gives access to a full error message.
The message includes all available context as well as the info about error type
- Returns
- the full message
Implemented in PDI::Multiple_errors, and PDI::Spectree_error.
◆ rethrow_with_context() [2/2]
template<typename... Args>
| void PDI::Error::rethrow_with_context |
( |
fmt::format_string< Args... > | format_str, |
|
|
Args &&... | args ) const |
|
inline |
Rethrow the error with some context prepended to its description.
- Parameters
-
| [in] | format_str | the context to prepend to the error message as a python-style {fmt} format |
| [in] | args | the fmt parameters for the message |
The documentation for this class was generated from the following file: