|
DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
|
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 | impl |
| Implementation of the error class for a variadic number of context items. More... | |
| struct | program_logic |
| Program logic failure error tag. More... | |
| struct | program_corrupted |
| Program corrupted error tag. More... | |
| struct | uninterpretable_data |
| Uninterpretable data error tag. More... | |
| struct | network_failure |
| Network failure error tag. More... | |
| struct | file_encrypted |
| File is encrypted error tag. More... | |
| class | nested |
| A template class that simplifies the creation of nested exceptions. 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. | |
| DOCWIRE_CORE_EXPORT void | panic (std::exception_ptr eptr) |
| Terminates the program with a panic message in debug builds. | |
| DOCWIRE_CORE_EXPORT std::string | diagnostic_message (const std::exception &e) |
| Generates a diagnostic message for the given nested exceptions chain. | |
| DOCWIRE_CORE_EXPORT 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. More... | |
| 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. More... | |
| template<typename Inner , typename Outer > | |
| auto | make_nested (Inner &&inner, Outer &&outer) |
| Creates a nested exception from an inner exception and an outer exception. More... | |
| 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. More... | |
| 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. More... | |
Provides features for reporting and handling errors with context data using nested exceptions.
| 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.