AVOID. Use folly::get_exception<Ex>(r) to check for specific exceptions. It may be OK to add more specific accessors to error_or_stopped, see throw_exception() for an example.

Synopsis

Declared in <folly/result/result.h>

[[nodiscard]]
std::exception_ptr
to_exception_ptr_slow() &&;

Description

INVARIANT: Ensure !has_stopped(), or you will see a debug‐fatal.

See from_exception_ptr_slow for the downsides and the rationale.

Return Value

The stored error as a std::exception_ptr.

Note

The return value should not be discarded.

Created with MrDocs