RPNX::QueryGraph
Typed, memoized, concurrent query evaluation for C++23
Loading...
Searching...
No Matches
rpnx::querygraph::error_result Class Reference

Discriminated error state used by query and subquery results. More...

#include <querygraph.hpp>

Public Member Functions

 error_result ()=default
 Construct an empty error state.
 
bool has_error () const
 Return whether either error representation is present.
 
bool has_canonical_error () const
 Return whether a serializable canonical error is present.
 
bool has_unexpected_exception () const
 Return whether an unexpected exception is present.
 
status result_status () const
 Return the dump status represented by this error state.
 
std::exception_ptr unexpected_exception () const
 Return the unexpected exception pointer, if present.
 
std::exception_ptr make_exception_ptr () const
 Materialize either error representation as an exception pointer.
 
void throw_error () const
 Rethrow the stored error; do nothing when the state is empty.
 
std::string message () const
 Return the error message, or an empty string for no error.
 
std::optional< canonical_error_result_datacanonical_dump () const
 Return serializable data only when the error is canonical.
 

Static Public Member Functions

static error_result canonical (canonical_error_storage error)
 Construct an error state from canonical storage.
 
static error_result unexpected (std::exception_ptr exception)
 Construct an error state from an unexpected exception.
 

Detailed Description

Discriminated error state used by query and subquery results.

A result has either no error, one canonical error, or one unexpected exception. Canonical errors are suitable for stable graph dumps; unexpected exceptions preserve only their process-local exception pointer.

Definition at line 459 of file querygraph.hpp.


The documentation for this class was generated from the following file: