nestable_coded_rich_error
Declared in <folly/result/nestable_coded_rich_error.h>
template<typename... Codes>
struct nestable_coded_rich_error;
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.
| Name |
|---|
folly_get_exception_hint_types |
| Name |
|---|
next_error_for_epitaph |
retrieve_code |
| Name |
|---|
Unnamed using |