Holds string context, error_code and the pointer to the following error. More...
#include <extended_error.h>
Public Member Functions | |
extended_error_t (const std::string &context_, const std::error_code &ec_, const extended_error_ptr_t &next_={}, const message_ptr_t &request_={}) noexcept | |
extened error constructor | |
std::string | message (const message_stringifier_t *stringifier=nullptr) const noexcept |
human-readable detailed description of the error | |
extended_error_ptr_t | root () const noexcept |
returns root (inner-most) extended error | |
Public Attributes | |
std::string | context |
error context, usually actor identity | |
std::error_code | ec |
abstract error code, describing occurred error | |
extended_error_ptr_t | next |
pointer to the parent error | |
message_ptr_t | request |
pointer request caused error | |
Holds string context, error_code and the pointer to the following error.
This is extension over std::error_code, to make it possible to identify the context of the error (usually it is actor identity), and make it possible to construct the chain of failures, that's why there is a smart pointer to the next error.
|
noexcept |
human-readable detailed description of the error
First, it stringifies own error in accordance with the context.
Second, it recursively ask details on all following errors, appending them into the result. The result string is returned.