Checked vs unchecked exceptions

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 28 06:07:16 PDT 2017


On Tuesday, 27 June 2017 at 16:54:08 UTC, Sebastien Alaiwan wrote:
> adorned with a do-try block, or a try!, or a try?. There is no 
> way, in this language, to silently throw an exception all the 
> way to the top level; without paving a super-hiway for it up 
> through the entire calling tree."

I don't think this is the best argument, if the programmer wants 
to reduce the number of exceptions that are propagated then the 
exception should be recast to a more abstract exception between 
module boundaries.

So the "super highway" issue is more a result of the programmer 
not being interested in structuring error-handling, but rather 
view errors as something that never should happen. Which may make 
sense in some applications, but not in all.


More information about the Digitalmars-d mailing list