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