|
parcel 0.2.2
Wrappable, wire-transferable C++23 value system with JSON serialization
|
Structured error returned by the non-throwing try_* parsing surface.
More...
#include <error.h>
Public Types | |
| enum class | Code { InvalidJson , KindMismatch , UnknownKind , MissingField , TypeError } |
| Coarse error categories. More... | |
Public Member Functions | |
| std::string | to_string () const |
Render the error as code: message [kind=…] [field=…]. | |
Static Public Member Functions | |
| static ParcelError | make (const Code c, std::string msg, std::string kind_id={}, std::string fld={}) |
| Construct from code, message, and optional kind/field tags. | |
Public Attributes | |
| Code | code {Code::InvalidJson} |
| Coarse error code. | |
| std::string | message |
| Human-readable message — never empty. | |
| std::string | kind |
| Kind id involved in the error (may be empty). | |
| std::string | field |
| Struct field name involved in the error (may be empty). | |
Structured error returned by the non-throwing try_* parsing surface.
Carries a coarse code, a human-readable message, and (when relevant) the cell kind id and field name involved.
|
strong |
Coarse error categories.
|
inline |
Render the error as code: message [kind=…] [field=…].