【发布时间】:2015-06-24 09:36:05
【问题描述】:
昨天我更新到 El Capitan beta 2 和 Xcode 7 - beta 是强制性的。所以我将我的应用程序更新为 Swift 2 并且 json 字符串出现了新错误。这是我的代码:
let jsonData:NSDictionary = NSJSONSerialization.JSONObjectWithData(urlData!, options:NSJSONReadingOptions.MutableContainers ) as! NSDictionary
这是错误:Call can throw , but it is not marked with 'try' and the error is not handled
【问题讨论】: