4 ms·
> The problem is that errors can and will happen, and exceptions make the control flow of error handle unpredictably convoluted. I take it you never have seen
by Flow 15y ago
> The problem is that errors can and will happen, and exceptions make the control flow of error handle unpredictably convoluted.
I take it you never have seen the "leaning Eiffel tower of nested if's in C/Pro-C? As I wrote, in a language with exception handling you code as if errors never would happen. And then you put using/try+finally/block-exit clauses around your statements to assure cleanup will happen no matter what.
How is that convoluted? Good such code looks almost naïve to me.
>Callers that do not have any of the real context in which the error happened, and that often can't do anything particularly smart about it other than throw their hands in the air.
Well, exactly how smart a caller can be is decided by the protocol between caller and callee. It's no different than what return-values would have given you IMHO.