dc0d / wrapperr

Where did that error happen down the call chain? Right at the bottom!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PkgGoDev Go Report Card Maintainability Test Coverage

wrapperr

Where did that error happen down the call chain?

Right at the bottom!

https://github.com/dc0d/wrapperr

All you need to do is, instead of:

return nil, err

Do:

return nil, wrapperr.WithStack(err)

Also, it is possible to annotate the stack in the middle:

https://github.com/dc0d/wrapperr

And to get the original error, just used the standard errors.Unwrap(error) function from built-in errors package.

About

Where did that error happen down the call chain? Right at the bottom!

License:MIT License


Languages

Language:Go 97.7%Language:Makefile 1.9%Language:Shell 0.4%