errors
errors copied to clipboard
Simple error handling primitives
> "The traditional error handling idiom in Go is roughly akin to .... which applied recursively up the call stack results in *error reports without context or debugging information*. The...
I have been using this package for a while now without any problems (I love it). However, today I came across a behaviour in my code that I can't understand...
go version go1.10 linux/amd64 The following snippet causes the stacktrace to point to the wrong source code line. ```go package main import ( "fmt" "runtime/debug" "github.com/pkg/errors" ) type Bar struct...
Hello, I'm not sure how this project would feel about a performance inspired change but figured I would at least present my findings since the gains are pretty significant. I...
There are several error types in the standard library that wrap errors. [net/url.Error](https://golang.org/pkg/net/url/#Error), for example, 'reports an error and the operation and URL that caused it.' This error type is...
I know it's totally my bad to cause this in the first place, but I've somehow made `err.Error()` recurse forever, which means the err itself is the `cause`. I haven't...
What is you opinion on having the ability to wrap an existing *error* instead of a *message* and thereby also changing the cause of the returned error? Something along the...
After amending an error using errors.WithMessage, printing the error with `%+v` prints the extra information after the stack trace instead of with the original message. For example: ```go package main...
Is it possible when printing an error to only print the Callstack that is generated from this position onward, but ignore the Callstack that happened prior to the method that...
Hello, we are wrapping our errors in our grpc service, and we came across a situation where we wanted to return the top of the wrapped errors in the return...