3 ms·
Call site vs use site is a great dichotomy for this discussion. My position is that the caller decides how to deal with exceptions. When I'm adding a new opera
by jimbobimbo 6y ago
Call site vs use site is a great dichotomy for this discussion.
My position is that the caller decides how to deal with exceptions. When I'm adding a new operation to my web app, I won't add any exception handling at all. Why would I? There's a central exception handler in my app, which will log exception, analyze its type and return an appropriate status code to the caller (e.g. 500 or 400). If there's a kind of failure my centralized handler doesn't handle correctly, I'll add an explicit handler in the new operation, which would do the right thing in some cases, while the rest of issues are handled centrally still.
Checked exceptions make me have dummy handlers all over the place.