whenFailure(_:)

    Adds an observer callback to this EventLoopFuture that is called when the EventLoopFuture has a failure result.

    EventLoopFuture.swift:830
    @preconcurrency func whenFailure(_ callback: @escaping (Error) -> Void)

    Parameters

    callback

    The callback that is called with the failed result of the EventLoopFuture.

    An observer callback cannot return a value, meaning that this function cannot be chained from. If you are attempting to create a computation pipeline, consider recover or flatMapError. If you find yourself passing the results from this EventLoopFuture to a new EventLoopPromise in the body of this function, consider using cascade instead.

    Other members in extension

    Type members

    Instance members

    Show obsolete interfaces (9)

    Hide obsolete interfaces