nestable_coded_rich_error
Synopsis
Declared in <folly/result/nestable_coded_rich_error.h>
template<typename... Codes>
struct nestable_coded_rich_error;
Description
Like coded_rich_error (read its docs first!), plus the ability to nest around another "next" exception for better debuggability.
This becomes the new "underlying exception" in rich_error_base jargon. The nested error's type, message, location, codes are NOT exposed ‐‐ they're only visible via fmt / ostream output for debugging.
If you do NOT intend to "hide" the type of the old error (next arg), then you may be wanting the transparent annotations from epitaph.h.
Future: This currently doesn't support nesting during constant evaluation. That would require adding a consteval ctor taking rich_exception_ptr*, similar to ConstErrWithNext in immortal_rich_error_test.cpp. Do add this (plus a constexpr test) if the need comes up.
Type Aliases
Member Functions
Using Declarations
Name |
Created with MrDocs