Hacker News new | ask | show | jobs
by planet-and-halo 1743 days ago
I think the biggest place where it's really necessary is integration points. Within your system it's reasonable to try to define exceptions out of existence. Once you start accepting user input or depending upon some system outside of your control, though, you better have some kind of mechanism to handle whatever unknown asteroids come flying in from deep space ready to annihilate your entire planet and civilization.
1 comments

That is still provided by error values or error types. The defining feature of exceptions is that they provide a secondary control flow path, and that control flow path automatically flows up the stack until it reaches an explicit catch.

With error values/types, control flow happens normally, and the programmer is expected to explicitly branch on the the value using normal control flow constructs.