preconditionFailure

func preconditionFailure(_:file:line:)(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) -> Never

Indicates that a precondition was violated.

Use this function to stop the program when control flow can only reach the call if your API was improperly used. This function's effects vary depending on the build flag used: