assertionFailure

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

Indicates that an internal sanity check failed.

Use this function to stop the program, without impacting the performance of shipping code, when control flow is not expected to reach the call---for example, in the default case of a switch where you have knowledge that one of the other cases must be satisfied. To protect code from invalid usage in Release builds, see preconditionFailure(_:file:line:).