|
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
|
Base class for all exceptions in the SDK. More...
#include <error.h>
Public Member Functions | |
| base (const source_location &location=source_location::current()) | |
| Constructs a base object with the current source location. More... | |
| virtual std::type_info const & | context_type (size_t index) const noexcept=0 |
| Get the type information of the context. More... | |
| virtual std::string | context_string (size_t index) const =0 |
| Get the string representation of the context. More... | |
| virtual size_t | context_count () const noexcept=0 |
| Get the number of context items. | |
| virtual const char * | what () const noexcept override |
| Get the exception type. More... | |
Public Attributes | |
| source_location | location |
| The source location where the exception was thrown. | |
Base class for all exceptions in the SDK.
This class provides a foundation for exceptions in the SDK, combining the ability to throw any object as an exception with compatibility with the standard C++ exception class, std::exception.
The class is designed to hold context information of any type, such as error messages, error tags, or important context values. This information can be stored in the form of a string, a name-value pair, or any other C++ type.
In addition to the context information, this class also stores the source location where the exception was thrown. This information is useful for debugging and error reporting purposes.
| docwire::errors::base::base | ( | const source_location & | location = source_location::current() | ) |
Constructs a base object with the current source location.
| location | The source location of the exception (initialized by current location by default). |
|
pure virtual |
Get the string representation of the context.
| index | The index of the context item. |
Implemented in docwire::errors::impl< T >.
|
pure virtualnoexcept |
Get the type information of the context.
| index | The index of the context item. |
Implemented in docwire::errors::impl< T >.
|
overridevirtualnoexcept |
Get the exception type.
This method is provided for compatibility with the standard C++ exception class. It returns the type name of the exception instead of a formatted message for security reasons.