From the book IOS 8 SDK Development 2nd Edition by Chris Adamson on the end of Chapter 6.
I have an issue with the error call and how exactly I convert it from the old swift to the new swift, with do.. and try here's my block of code
func handleTwitterData (data: NSData!, urlResponse: NSHTTPURLResponse!, error: NSError!) {
if let dataValue = data {
var parseError : NSError? = nil
let jsonObject : AnyObject? = NSJSONSerialization.JSONObjectWithData(dataValue, options: NSJSONReadingOptions(0), error: &parseError)
print("JSON error: \(parseError)\nJSON response: \(jsonObject)")
} else {
print("handleTwitterData received no data")
}
}