> Domain, code, and user-info are useful for Cocoa interoperability but aren’t 
> otherwise necessary in Swift, which captures that information more directly 
> in the (concrete) error types that conform to Error.
So the only motivation to hide _code and _domain is to discourage 
Objective-C-like dispatching in Swift, right?
For me, that would not be enough motivation to require something like 
"CustomNSError", but probably this isn't the opinion of the majority.

I still think Error should be a legacy-type that is only needed for 
interoperability… but removing the restriction that only Error-types can be 
thrown is additive, so I won't continue discussing this now.

- Tino
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to