2 ms·
i find proper error handling to be just as interesting as coding the actual algorithm, especially server-side. debugging big distributed systems often boils do
by johnthescott 6y ago
i find proper error handling to be just as interesting as coding the actual algorithm, especially server-side. debugging big distributed systems often boils down to how errors are handled. throwing an exception loses too much context and feels like cheating.
- closeparen 6y agoIt’s interesting when there’s some way to recover from the error, but the vast majority of the time I’m just wrapping it and passing it up to the caller. It also depends somewhat on how many potentially-error-returning calls are involved in an operation. Go’s verbosity means there can be 7+ different error return points in what would be a single statement in another language (HTTP request, subprocess, etc). I sometimes like the fact that I have to handle error for the operation generally, but not at that level of detail.