Specific reason for not embracing the use of exceptions for error propagation?

They are just super afraid that some code might throw an exception which is never caught.

But what is the programmer supposed to do once an exception is caught?

If I call f (g (h x))* where h raises an exception, say Failure "network error", and f handles them (logs them and drops them), I don’t want g to be involved because g can do nothing about it. I don’t want the source code of g to be more complicated than it needs to be. Now if there’s not one but ten functions g1, g2, …, g10 functions in the call stack between f and h, and they represent much of the application’s source code, their type is polluted by error propagation that’s irrelevant to what they do. Exception propagation makes this transparent and it’s great.

*edit: I mean f calls g, which calls h.

1 Like