Unconditionally prints a given message and stops execution.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
func fatalError(_ message: @autoclosure () -> String = String(), file: Static String = #file, line: UInt = #line) -> Never
Parameters
messageThe string to print. The default is an empty string.
fileThe file name to print with
message. The default is the file wherefatalis called.Error(_: file: line:) lineThe line number to print along with
message. The default is the line number wherefatalis called.Error(_: file: line:)