I'm pretty new to Swift. Have many years of experience in Objective-C. I'm trying to convert an Objective-C class to Swift as an exercise. I'm having a problem calling dataTask function in URLSession:
let task = session.dataTask(with: url) { (taskData, taskResponse, error) in
The compiler keeps giving me a warning that there is an "Invalid conversion from throwing function of type '(_, _, _) throws -> ()' to non-throwing function type '(Data?, URLResponse?, Error?) -> Void'". Looking in the documentation for the dataTask func, I don't see any mention of the method throwing an exception.
What am I missing?