catch_exception overloads
Declared in <folly/lang/Exception.h>
Usage note: Passing extra values as arguments rather than capturing them allows smaller inlined native code at the call-site.
template<
typename Try,
typename Catch,
typename... CatchA,
typename R = std::common_type_t<decltype(FOLLY_DECLVAL(Try&&)()), decltype(FOLLY_DECLVAL(Catch&&)(FOLLY_DECLVAL(CatchA&&)...))>>
R
catch_exception(
Try&& t,
Catch&& c,
CatchA&&... a) noexcept(/* see-below */);
» more...
catch_exception
template<
typename E,
typename Try,
typename Catch,
typename... CatchA,
typename R = std::common_type_t<decltype(FOLLY_DECLVAL(Try&&)()), decltype(FOLLY_DECLVAL(Catch&&)(
FOLLY_DECLVAL(E&), FOLLY_DECLVAL(CatchA&&)...))>>
R
catch_exception(
Try&& t,
Catch&& c,
CatchA&&... a);
» more...
| Name | Description |
|---|---|
| t | The function to invoke and guard against a thrown exception. |
| c | The handler invoked when any exception is caught. |
| a | The extra arguments forwarded to the handler. |