folly::or_unwind_epitaph

or_unwind_epitaph

Synopsis

Declared in <folly/result/or_unwind_epitaph.h>

template<
    typename T,
    typename... Args>
auto
or_unwind_epitaph(
    result<T> r,
    ext::format_string_and_location<Args...> snl = "",
    Args const&... args);

Description

Syntax sugar for or_unwind(epitaph(...).

On the value path: epitaphs are skipped (just like epitaph). On the error-or-stopped path: epitaphs are added, then the error is propagated.

Return Value

An or_unwind wrapper carrying the annotated result.

Parameters

NameDescription
rThe result whose error path receives the epitaph.
snlThe format string and source location for the epitaph message.
argsThe arguments substituted into the epitaph message.