/wrapperr

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

Primary LanguageGoMIT LicenseMIT

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.