func
assertionFailure
(
_
:
file
:
line
:)(
_
message
: @
autoclosure
() -
>
String
=
String
(),
file
:
StaticString
= #
file
,
line
:
UInt
= #
line
)
Auto-generated documentation for Swift. Command-click no more.
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 aswitch
where you have knowledge that one of the other cases must be satisfied. To protect code from invalid usage in Release builds, seepreconditionFailure(_:file:line:)
.