folly::exception_ptr_get_object

exception_ptr_get_object overloads

Synopses

Declared in <folly/lang/Exception.h>

Returns the true address of the exception as stored without upcasting.

void*
exception_ptr_get_object(std::exception_ptr const& ptr) noexcept;
» more...

Returns the address of the stored exception as if it were upcast to the given type, if it could be upcast to that type.

template<typename T>
T*
exception_ptr_get_object(std::exception_ptr const& ptr) noexcept;
» more...

Returns the address of the stored exception, optionally upcast to a type.

void*
exception_ptr_get_object(
    std::exception_ptr const& ptr,
    std::type_info const const* target) noexcept;
» more...

Return Value

  • The address of the stored exception, or null if empty.
  • A pointer to the stored exception as T, or null if not convertible.
  • The address of the stored exception, or null if not convertible.

Parameters

NameDescription
ptrThe exception_ptr whose stored exception is inspected.
targetThe type to upcast to, or null for no upcasting.