Created
August 8, 2016 21:55
-
-
Save jspahrsummers/4482c1649cfef543c4a7b92d9881e74f to your computer and use it in GitHub Desktop.
An unexpected error has occurred.
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
do { | |
try myFunctionWhichOnlyThrowsOneErrorType() | |
} catch let err as ThatOneErrorType { | |
handleAppropriately() | |
} catch let err { | |
preconditionFailure("Unexpected error: \(err)") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment