Applies yes to the value, or throws the result of no on error.

Synopsis

Declared in <folly/Expected.h>

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 function producing the exception to throw on error.

Created with MrDocs