Why exceptions for error handling is so important

Jeremy Powers via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 13 18:39:44 PST 2015


>
> http://www.artima.com/intv/handcuffs.html
>
> The best sum up of checked exception you'll find.
>

False.

Unless you mean 'the best sum up of the problems people have with checked
exceptions' - it gives a good description of how use of checked exceptions
often goes wrong.

For those of us that regularly use checked exceptions, these are known
problems and easily worked around.  Some are not problems but features
(i.e. ignoring them is painful and obvious).

Granted, a better solution to the problem may be able to avoid problems all
together.  But as discussed in this newsgroup before, no better solution
presents itself.


NB: It also seems to have a very skewed view of how to handle errors
(exceptions) that come up, preferring to just throw everything up to one
handler instead of dealing with at the proper abstraction level.  This may
be appropriate for certain systems but is not a good strategy in general.
If you are doing this then you will likely not see the advantages of
checked exceptions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150113/8e1bc4f4/attachment.html>


More information about the Digitalmars-d mailing list