3 ms·
Almost all error-related code in Go is just doing by hand what an exception system would do automatically: stop the current function and propagate it to the cal
by closeparen 2y ago
Almost all error-related code in Go is just doing by hand what an exception system would do automatically: stop the current function and propagate it to the caller. The error is not being "dealt with" in a meaningful way except at the outermost layers of the onion (i.e. HTTP/RPC middleware converting it to a wire protocol error response) which could have used a try/catch anyway.