Generic Instance Method

setFailureType(to:)

Changes the failure type declared by the upstream publisher.

Declaration

func setFailureType<E>(to failureType: E.Type) -> Publishers.SetFailureType<Publishers.Zip3<A, B, C>, E> where E : Error
Available when Failure is Never.

Parameters

failureType

The Failure type presented by this publisher.

Return Value

A publisher that appears to send the specified failure type.

Discussion

The publisher returned by this method cannot actually fail with the specified type and instead just finishes normally. Instead, you use this method when you need to match the error types of two mismatched publishers.