Expression switch exception naming
mark at io7m.com
Wed Mar 28 13:39:47 UTC 2018
On 2018-03-28T14:15:33 +0100
Gavin Bierman <gavin.bierman at oracle.com> wrote:
> A worry here might be that other future features might want to raise this exception, and the name will be less applicable. Perhaps "UnexpectedValueException"?
Is this really a worry? I mean, it's not really as if unchecked
exception types are in short supply. I'd be in favour of adding more
and more specific exceptions so that instances of them indicated
*exactly* what went wrong (rather than "one of these several different
language constructs went wrong in some way").
Mark Raynsford | http://www.io7m.com
More information about the amber-spec-experts