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

Type-erased, copyable storage for a registered exception value. More...

#include <querygraph.hpp>

Public Member Functions

void throw_copy () const
 Throw a copy of the stored concrete exception.
 
std::exception_ptr make_exception_ptr () const
 Return an exception_ptr holding a copy of the error.
 
std::string message () const
 Return the stored exception's human-readable message.
 
canonical_error_result_data dump () const
 Convert the error to its serializable dump representation.
 

Public Attributes

tsig m_error_typesig {}
 Type signature of the concrete exception type.
 
std::any m_error_value
 Type-erased concrete exception value.
 
std::function< void(std::any const &) > m_throw_copy
 Operation that throws a copy of m_error_value.
 
std::function< std::vector< std::byte >(std::any const &) > m_serialize
 Operation that serializes m_error_value.
 
std::function< std::string(std::any const &) > m_message
 Operation that obtains the concrete exception message.
 

Detailed Description

Type-erased, copyable storage for a registered exception value.

Canonical storage retains the concrete error, operations for copying it back into an exception, and operations for serializing and displaying it. Instances are normally created with make_canonical_error_storage().

Definition at line 396 of file querygraph.hpp.

Member Data Documentation

◆ m_error_typesig

tsig rpnx::querygraph::canonical_error_storage::m_error_typesig {}

Type signature of the concrete exception type.

Definition at line 399 of file querygraph.hpp.

Referenced by rpnx::querygraph::make_canonical_error_storage().

◆ m_error_value

std::any rpnx::querygraph::canonical_error_storage::m_error_value

Type-erased concrete exception value.

Definition at line 401 of file querygraph.hpp.

Referenced by rpnx::querygraph::make_canonical_error_storage().

◆ m_message

std::function< std::string(std::any const&) > rpnx::querygraph::canonical_error_storage::m_message

Operation that obtains the concrete exception message.

Definition at line 407 of file querygraph.hpp.

Referenced by rpnx::querygraph::make_canonical_error_storage().

◆ m_serialize

std::function< std::vector< std::byte >(std::any const&) > rpnx::querygraph::canonical_error_storage::m_serialize

Operation that serializes m_error_value.

Definition at line 405 of file querygraph.hpp.

Referenced by rpnx::querygraph::make_canonical_error_storage().

◆ m_throw_copy

std::function< void(std::any const&) > rpnx::querygraph::canonical_error_storage::m_throw_copy

Operation that throws a copy of m_error_value.

Definition at line 403 of file querygraph.hpp.

Referenced by rpnx::querygraph::make_canonical_error_storage().


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