Hi!
So I have this code
convenience init(theme: String) {
let soundFile = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource(theme, ofType: "m4a")!)
do {
try self.init(contentsOfURL: soundFile)
}
catch let error as NSError {
print("Sound engine failed: \(error.localizedDescription)")
return
}
}It was OK before the latest beta. Now it says: 'self' used inside 'catch' block reachable from self.init call.
I see that self.init throws an excepition and I see I should handle it. But when I try I get this error. And it makes no sence to me: the self is inside try block, not inside catch block. Does anybody can tell me what's wrong and how can I make an convenience init of the throwable self.init? Thank you!