We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When printing error which have causes with %+v verb, you'll get the stack trace several times.
%+v
main.go
package main import ( "fmt" "github.com/friendsofgo/errors" ) func a() error { return errors.Errorf("a") } func b() error { err := a() return errors.Wrap(err, "b") } func c() error { err := b() return errors.Wrap(err, "c") } func main() { err := c() fmt.Printf("%+v\n", err) }
Running
$ go run main.go a main.a /tmp/pe/main.go:10 main.b /tmp/pe/main.go:14 main.c /tmp/pe/main.go:19 main.main /tmp/pe/main.go:24 runtime.main /opt/go/src/runtime/proc.go:203 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1357 b main.b /tmp/pe/main.go:15 main.c /tmp/pe/main.go:19 main.main /tmp/pe/main.go:24 runtime.main /opt/go/src/runtime/proc.go:203 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1357 c main.c /tmp/pe/main.go:20 main.main /tmp/pe/main.go:24 runtime.main /opt/go/src/runtime/proc.go:203 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1357
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When printing error which have causes with
%+v
verb, you'll get the stack trace several times.main.go
Running
The text was updated successfully, but these errors were encountered: