by makecheck · 7y ago · 0 comments
For example, in this case: the claim that error handling is “centralized”...how can you be sure? It is generally trivial to locally ignore or capture errors that may not propagate even if they should. Dependencies may not be well-behaved. If you cannot force (or fake) key conditions that “should” cause a component to fail, you don’t really know how that error affects the system or if it can even be seen by the “centralized” handler. One of the issues with exception handling is that programmers may think synthesizing each exception “tests” the condition, when you may not even be able to prove that the real error will lead to the expected exception. You have to be able to simulate or force the bad behaviors themselves, independent from your exception hierarchy.
I’m also skeptical that having local error code “disappear” is a net win. When debugging, you’d probably have to add it all back to know how the heck an error might have originated from that local code. At the very least, local code to reveal errors should never go away.
No comments yet.