Swift assert
up:: Swift ⚐
If the condition fails, the app will crash and a message will be printed.
It is only used in Debug mode. In release mode, it gets compiled away.
assertionFailure
will make the app crash whenever it is executed. Put it code that should never run, eg. the “default” state of a switch
statement.i