Contents

init(upstream:handler:)

Creates a publisher that handles errors from an upstream publisher by replacing the failed publisher with another publisher.

Declaration

init(upstream: Upstream, handler: @escaping (Upstream.Failure) -> NewPublisher)

Parameters

  • upstream:

    The publisher from which this publisher receives its elements.

  • handler:

    A closure that accepts the upstream failure as input and returns a publisher to replace the upstream publisher.