AVOID. Use error_or_stopped(YourException{...}) if at all possible. Add a std::in_place_type_t<Ex> constructor if needed.
Declared in <folly/result/result.h>
static
error_or_stopped
from_exception_ptr_slow(std::exception_ptr eptr);
Provided for compatibility with existing code. It has several downsides for result-first code:
It is a debug-fatal invariant violation to pass in an exception_ptr that is empty or has OperationCancelled. See the dfatal_if_eptr_empty_or_stopped doc.
Not knowing the static exception type blocks optimizations that can otherwise help avoid RTTI on error paths.
An error_or_stopped holding eptr.
| Name | Description |
|---|---|
| eptr | The exception pointer to wrap (must be non-empty, non-stopped). |