Just a point of clarification here:
they can trigger exceptions, but aren't marked with
throw
You’re comparing apples to oranges here. The exceptions thrown by these legacy APIs are Objective-C language exceptions [1]. There are very different from Swift errors and Swift can’t deal with them at all. The Objective-C equivalent of a Swift error is an NSError
output parameter.
Share and Enjoy
Quinn “The Eskimo!” @ DTS @ Apple
[1] On most platforms such exceptions are equivalent to C++ exceptions.