I'm trying to create and return a Storyboard programmatically while preventing a crash checking for an exception per Apple's documentation on UIStoryboard.
This method should return an exception if the storyboard mentioned doesn't exist:
init(name name: String,
bundle storyboardBundleOrNil: NSBundle?)
As it stands putting the following code:
do {
let storyboard = try UIStoryboard(name: "tester", bundle: nil)
} catch {
// Do something
}
in a do-catch clause is being met by the pre-compiler with the following warning that the method:
'catch' block is unreachable because no errors are thrown in 'do' block
Might this be a bug?
Edit: 2015/11/19 After sending a radar to Apple about it, they have responded with the fact the issue is known and that my report is a duplicate of an open one.