Last active
August 29, 2015 14:22
-
-
Save sonsongithub/91217e252be445dfa277 to your computer and use it in GitHub Desktop.
Playground crushes when running the following code in Xcode7.
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
import UIKit | |
func doit(value:Int) throws -> String { | |
if value > 0 { | |
return String(value) | |
} | |
else { | |
throw NSError(domain: "test.sonson.com", code: 0, userInfo: [:]) | |
} | |
} | |
do { | |
let sample = try doit(0) | |
} catch { | |
print("a") | |
} | |
print("a") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment