get_exception overloads

Synopses

Declared in <folly/lang/Exception.h>

Returns the contained exception via the const path for a mutable source.

template<typename Ex = std::exception>
constexpr
auto
get_exception(Src& s) noexcept;

Returns a pointer‐like to the contained exception of type Ex, or null.

template<typename Ex = std::exception>
constexpr
auto
get_exception(Src const& src) noexcept;

Deleted to prevent returning a pointer into an rvalue source.

template<typename Ex = std::exception>
void
get_exception(Src&& s) noexcept = delete;

Deleted to prevent returning a pointer into a const rvalue source.

template<typename Ex = std::exception>
void
get_exception(Src const&& s) noexcept = delete;

Return Value

A pointer‐like to the contained Ex, or null if none is present.

Parameters

Name

Description

s

The mutable exception container or exception_ptr to inspect.

src

The exception container or exception_ptr to inspect.

Created with MrDocs