thenOrThrow_ overloads
Synopses
Declared in <folly/Expected.h>
Applies yes to the value, or invokes no and throws on error.
template<
class This,
class Yes,
class No,
class Ret = decltype(std::declval<Yes>()(std::declval<This>().value())),
class Err = decltype(std::declval<No>()(std::declval<This&>().error())),
bool FollyRequires948 = false>
static
Ret
thenOrThrow_(
This&& ex,
Yes&& yes,
No&& no);
Applies yes to the value, or throws the result of no on error.
template<
class This,
class Yes,
class No,
class Ret = decltype(std::declval<Yes>()(std::declval<This>().value())),
class Err = decltype(std::declval<No>()(std::declval<This>().error())),
bool FollyRequires929 = false>
static
Ret
thenOrThrow_(
This&& ex,
Yes&& yes,
No&& no);
Return Value
The result of applying yes to the value.
Parameters
Name |
Description |
ex |
The Expected to inspect. |
yes |
The continuation applied to the value. |
no |
The error handler invoked before throwing. |
Created with MrDocs