swift Call can throw, but it is not marked with 'try' and the error is not handled的解决办法

let fileManger = NSFileManager.defaultManager()

do {

let documentPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0]

let filePath = documentPath.stringByAppendingString("/recored.plist")

try fileManger.removeItemAtPath(filePath)

self.clearBlock!()

print(filePath)

textViewSelected = -1

tableView.reloadData()

}catch{

print("error")

}

你可能感兴趣的:(swift Call can throw, but it is not marked with 'try' and the error is not handled的解决办法)