Publisher

@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Publisher
  • Use this function whenever you want to ignore all errors emitted by the upstream publisher. Note that this does not restore the upstream publisher if it fails but, instead, emits a completion message instead of the error. Also consider looking at Publishers.IgnoreError.

    Declaration

    Swift

    public func ignoreError() -> Publishers.IgnoreError<Self>
  • Ignores all errors carried via a Result object and only returns unwrapped success values. Also consider looking at Publishers.IgnoreResultErrors.

    Declaration

    Swift

    public func ignoreResultErrors<R, F>() -> Publishers.IgnoreResultErrors<Self, R, F>
    where Output == Result<R, F>, F: Error