|
DocWire SDK
DocWire SDK: Deterministic, auditable, and secure data processing in C++20. On-premise by default. No compromises on computational speed.
|
Provides features for reporting and handling errors with context data using nested exceptions. More...
Classes | |
| struct | base |
| Base class for all exceptions in the SDK. More... | |
| struct | file_encrypted |
| File is encrypted error tag. More... | |
| struct | impl |
| Implementation of the error class for a variadic number of context items. More... | |
| class | nested |
| A template class that simplifies the creation of nested exceptions. More... | |
| struct | network_failure |
| Network failure error tag. More... | |
| struct | program_corrupted |
| Program corrupted error tag. More... | |
| struct | program_logic |
| Program logic failure error tag. More... | |
| struct | uninterpretable_data |
| Uninterpretable data error tag. More... | |
Functions | |
| template<typename T> | |
| bool | contains_type (const std::exception &e) |
| Checks if the given nested exceptions chain contains a specific type of context. | |
| void | panic (std::exception_ptr eptr) |
| Terminates the program with a panic message in debug builds. | |
| std::string | diagnostic_message (const std::exception &e) |
| Generates a diagnostic message for the given nested exceptions chain. | |
| std::string | diagnostic_message (std::exception_ptr eptr) |
| Generates a diagnostic message for the given nested exceptions chain. | |
| template<typename... Context> | |
| auto | make_error_from_tuple (const source_location &location, std::tuple< Context... > &&context_tuple) |
| Creates an error object from a tuple of context information. | |
| template<typename... Context> | |
| auto | make_error_ptr_from_tuple (const source_location &location, std::tuple< Context... > &&context_tuple) |
| Creates an exception_ptr containing an error object from a tuple of context information. | |
| template<typename Inner, typename Outer> | |
| auto | make_nested (Inner &&inner, Outer &&outer) |
| Creates a nested exception from an inner exception and an outer exception. | |
| template<typename Inner, typename Outer, typename... Rest> | |
| auto | make_nested (Inner &&inner, Outer &&outer, Rest &&... rest) |
| Creates a nested exception from inner exception and multiple outer exceptions. | |
| template<typename Inner, typename Outer, typename... Rest> | |
| std::exception_ptr | make_nested_ptr (Inner &&inner, Outer &&outer, Rest &&... rest) |
| Creates a pointer to a nested exception from an inner exception and an outer exception. | |
Provides features for reporting and handling errors with context data using nested exceptions.
| bool docwire::errors::contains_type | ( | const std::exception & | e | ) |
Checks if the given nested exceptions chain contains a specific type of context.
Definition at line 25 of file contains_type.h.
|
inline |
Generates a diagnostic message for the given nested exceptions chain.
Definition at line 27 of file diagnostic_message.h.
|
inline |
Generates a diagnostic message for the given nested exceptions chain.
Definition at line 77 of file diagnostic_message.h.
| auto docwire::errors::make_error_from_tuple | ( | const source_location & | location, |
| std::tuple< Context... > && | context_tuple ) |
Creates an error object from a tuple of context information.
| location | The source location where the error occurred. |
| context_tuple | A tuple containing context data. |
Definition at line 30 of file make_error.h.
| auto docwire::errors::make_error_ptr_from_tuple | ( | const source_location & | location, |
| std::tuple< Context... > && | context_tuple ) |
Creates an exception_ptr containing an error object from a tuple of context information.
| location | The source location where the error occurred. |
| context_tuple | A tuple containing context data. |
Definition at line 44 of file make_error.h.
| auto docwire::errors::make_nested | ( | Inner && | inner, |
| Outer && | outer ) |
Creates a nested exception from an inner exception and an outer exception.
This function creates a nested exception by throwing the inner exception and catching it, then using the outer exception to create a nested exception.
| Inner | The type of the inner exception. |
| Outer | The type of the outer exception. |
| inner | The inner exception to be nested. Can be exception object or std::exception_ptr. |
| outer | The outer exception to wrap the inner exception. |
Definition at line 84 of file nested_exception.h.
| auto docwire::errors::make_nested | ( | Inner && | inner, |
| Outer && | outer, | ||
| Rest &&... | rest ) |
Creates a nested exception from inner exception and multiple outer exceptions.
This function creates a nested exception by recursively calling make_nested with the inner exception and the outer exceptions.
| Inner | The type of the inner exception. |
| Outer | The type of the outer exception. |
| Rest | The types of additional outer exceptions (additional layers of nesting). |
| inner | The inner exception to be nested. Can be exception object or std::exception_ptr. |
| outer | The outer exception to wrap the inner exception. |
| rest | Additional outer exceptions to add additional layers of nesting. |
Definition at line 119 of file nested_exception.h.
| std::exception_ptr docwire::errors::make_nested_ptr | ( | Inner && | inner, |
| Outer && | outer, | ||
| Rest &&... | rest ) |
Creates a pointer to a nested exception from an inner exception and an outer exception.
This function creates a pointer to a nested exception by recursively calling make_nested with the inner exception and the outer exceptions and then converting the result to a std::exception_ptr.
| Inner | The type of the inner exception. |
| Outer | The type of the outer exception. |
| Rest | The types of additional outer exceptions (additional layers of nesting). |
| inner | The inner exception to be nested. Can be exception object or std::exception_ptr. |
| outer | The outer exception to wrap the inner exception. |
| rest | Additional outer exceptions to add additional layers of nesting. |
Definition at line 145 of file nested_exception.h.
|
inline |
Terminates the program with a panic message in debug builds.
Definition at line 32 of file debug_assert.h.