Wraps a pipeline so exceptions of a given type are passed to a handler.

Synopsis

Declared in <folly/gen/Base.h>

template<
    class Exception,
    class ErrorHandler,
    class GuardImpl = /* implementation-defined */>
GuardImpl
guard(ErrorHandler&& handler);

Return Value

An operator that guards the pipeline against Exception.

Parameters

Name

Description

handler

The error handler invoked for a caught exception.

Created with MrDocs