Hacker News new | ask | show | jobs
by grandinj 1976 days ago
> too many programs with a single exception handler right

For a number of useful applications, this is exactly the right, correct, and most useful approach.

I currently maintain several successful (within our commercial niche) 100kLOC+ programs that largely use such an architecture.

It puts the error-handling code in one place, and enables common logging, recovery, filtering and display.

It means that the vast majority of the code can happily just assume that the world is full of unicorns and light.

And given that it is written in Java, the program just largely keeps on running, even in the presence of bugs and weird edge cases, and suchlike, a feature our users really like.

Human are pretty good at going "OK, so that part of the program is having a bad day, I'll report the bug and keep on using the rest of the program".