Created
December 20, 2015 08:36
-
-
Save Anton3/47132957feed01828e13 to your computer and use it in GitHub Desktop.
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
func f() throws Error1 { return 42 } | |
func g(meaning: Int) throws Error2 { print(meaning) } | |
func test() { | |
do { | |
try g(try f()) | |
} catch let err1 as Error1 { | |
print("Error1") | |
} catch let err2 as Error2 { | |
print("Error2") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment