Last active
June 18, 2018 05:51
-
-
Save aainaj/486995ecdc2609e1402b500496c93f69 to your computer and use it in GitHub Desktop.
AsserstionFailure
This file contains 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
/* syntax: | |
public func assertionFailure( | |
_ message: @autoclosure () -> String = default, | |
file: StaticString = #file, | |
line: UInt = #line) | |
*/ | |
guard age >= 3 else { | |
return assertionFailure("Age can't be less than 3") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment