|
|
|
|
|
by joewillsher
3690 days ago
|
|
Here’s your explanation: https://github.com/apple/swift/blob/master/docs/ErrorHandlin... There has been discussion about statically typed errors on the evolution mailing list — some core team members said they may look into in the future and others seeming more doubtful of its usefulness. Why do you think a typed error handling model is better than introspecting the error at the catch site, I’m not sure I buy it? |
|
You can use Any for everything, and it can even be totally safe if you use as? correctly, but it's obvious why no one does that. It's not obvious to me why people are fine with that situation for errors - again, the catch-all handler issue mentioned above, and the bizarre special-casing of NSError.