Function

fatalError(_:file:line:)

Unconditionally prints a given message and stops execution.

Declaration

func fatalError(_ message: @autoclosure () -> String = default, 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 where fatalError(_:file:line:) is called.

line

The line number to print along with message. The default is the line number where fatalError(_:file:line:) is called.

See Also

Exiting a Program

enum Never

The return type of functions that do not return normally; a type with no values.