Instance Method

assertNoFailure(_:file:line:)

Raises a fatal error when its upstream publisher fails, and otherwise republishes all received input.

Declaration

func assertNoFailure(_ prefix: String = "", file: StaticString = #file, line: UInt = #line) -> Publishers.AssertNoFailure<Publishers.Share<Upstream>>

Parameters

prefix

A string used at the beginning of the fatal error message.

file

A filename used in the error message. This defaults to #file.

line

A line number used in the error message. This defaults to #line.

Return Value

A publisher that raises a fatal error when its upstream publisher fails.

Discussion

Use this function for internal sanity checks that are active during testing but do not impact performance of shipping code.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software