folly::or_unwind_epitaph

or_unwind_epitaph overloads

Synopses

Declared in <folly/result/or_unwind_epitaph.h>

Syntax sugar for or_unwind(epitaph(...)) on an error-or-stopped value.

template<typename... Args>
auto
or_unwind_epitaph(
    error_or_stopped eos,
    ext::format_string_and_location<Args...> snl = "",
    Args const&... args);
» more...

or_unwind_epitaph

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

Return Value

  • An or_unwind wrapper carrying the annotated error.
  • An or_unwind wrapper carrying the annotated result.

Parameters

NameDescription
eosThe error-or-stopped state to annotate.
snlThe format string and source location for the epitaph message.
argsThe arguments substituted into the epitaph message.
rThe result whose error path receives the epitaph.