>
> Under the hood each expression passed to "throw" could make something like
>
> enum bar_abcdefj_throw {
> case genericError // all NSError go here
> case MyEnumErrorFirstError
> }
>
> Where abcdefj is unique characters.
>
>
> This enum would only be visible through the catch blocks which would act like
> a switch statement.
Imho that's to much magic and way to special, and as errors often are regular
enums themselves, we'd end up in two levels of them.
There has been a discussion about ad-hoc enums before, but those were supposed
to be used as parameters (which seems lot less complicated to me — but still
wasn't simple enough to be added to the language).
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution