Extract frame information from Go error values
Introduction | Usage | Contributing
🚧 Disclaimer: framerr
is alpha quality software. The API may change
without warning between revisions. 🚧
framerr
extracts stack frame information for Go2 error values
Introduction | Usage | Contributing
As Go2 error value stack frame information is not programatically accessible,
you can use framerr
to extract a slice of frames from an error chain.
err1 := xerrors.New("an error")
err2 := cling.Wrap(err1, "wrapped")
// ...
frames := framerr.Extract(err)
Each Frame
holds the error message, and a Source
field that contains file,
package, function, and line information. Use these details to send stack info
to your favorite error tracking service!
For complete examples and usage, see the GoDoc documentation.
Introduction | Usage | Contributing
I would love your help!
framerr
is still a work in progress. You can help by:
- Opening a pull request to resolve an open issue.
- Adding a feature or enhancement of your own! If it might be big, please open an issue first so we can discuss it.
- Improving this
README
or adding other documentation toframerr
. - Letting me know if you're using
framerr
.