3 ms·
> Go's error handling works well in small programs but there's a couple of issues. It works fine in big programs, too. If you need more context, you add custom
by mratzloff 12y ago
> Go's error handling works well in small programs but there's a couple of issues.
It works fine in big programs, too. If you need more context, you add custom errors that have a context field. If you need to match different types of errors, you can have an error code that you can check against, or you can simply match strings (a lot of Go code does this). What you see as a problem is not really much of a problem in practice for well-structured code.