Created
February 1, 2019 13:44
-
-
Save novinfard/cfb2553f61f420af6d5c3c39b623a290 to your computer and use it in GitHub Desktop.
[Different level of error asserting in swift and corresponding result]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debug release release | |
function -Onone -O -Ounchecked | |
assert() YES NO NO | |
assertionFailure() YES NO NO** | |
precondition() YES YES NO | |
preconditionFailure() YES YES YES** | |
fatalError()* YES YES YES | |
– assert: checking your own code for internal errors | |
– precondition: for checking that your clients have given you valid arguments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment