What's the best way to find out which exceptions may be thrown ?

Johannes Loher johannes.loher at fg4f.de
Wed May 27 10:42:51 UTC 2020


Am 27.05.20 um 12:30 schrieb wjoe:
> 
> Could you please elaborate why checked exceptions are more annoying?
> 
> The only exposure to checked exceptions I had was with Java and I always
> liked and appreciated them.
> It's super annoying the fiddle around with catch(Exception) all over the
> place and log unhandled Exceptions and never be sure that all exceptions
> are properly taken care of.
>
There are several reasons. Walter elaborates on some of them in the
thread regarding the acceptance of DIP1028 in the announce section.
Another example is the fact that they don't work with functional
interfaces in Java: You cannot pass a function that throws checked
exceptions to map etc.


More information about the Digitalmars-d-learn mailing list