Declaration of the write
method on Data
class just says the method throws
, but what types of errors?
The documentation says:
throws: An error in the Cocoa domain, if there is an error writing to the URL.
I want to surround the invocation of that method with a try {} catch {}
clause and I'd prefer to catch specific errors and only catch the generic one if none of the specific ones were matched.