Sounds to me that deepsun and I are in agreement that an error message should tell you what the actual error was.
I.E. ERROR: TLS handshake failed: <DOMAIN> certificate chain unverified
People give Go's error handing a lot of flak, but I personally love the errors that come out of a quality codebase.
Just like your example: single line, to the point and loggable. e.g.
writing foo.zip: performing http request (bar.com): tls: handshake: expired certificate (1970-01-01)
People give Go's error handing a lot of flak, but I personally love the errors that come out of a quality codebase.
Just like your example: single line, to the point and loggable. e.g.
Exceptions with stack traces are so much more work for the reader. The effort of distilling what's going on is pushed to me at "runtime". Whereas in Go, this effort happens at compile time. The programmer curates the relevant context.