Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbowes/framerr
Extract frame information from Go2 error values
https://github.com/jbowes/framerr
errors go go2 golang
Last synced: about 1 month ago
JSON representation
Extract frame information from Go2 error values
- Host: GitHub
- URL: https://github.com/jbowes/framerr
- Owner: jbowes
- License: bsd-2-clause
- Created: 2019-06-04T18:27:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-13T22:20:55.000Z (over 5 years ago)
- Last Synced: 2024-10-14T12:50:03.400Z (2 months ago)
- Topics: errors, go, go2, golang
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
framerr
Extract frame information from Go error values
## Introduction
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
## Usage
[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.
```go
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](https://godoc.org/github.com/jbowes/framerr).
## Contributing
[Introduction] | [Usage] | ContributingI would love your help!
`framerr` is still a work in progress. You can help by:
- Opening a pull request to resolve an [open issue][issues].
- Adding a feature or enhancement of your own! If it might be big, please
[open an issue][enhancement] first so we can discuss it.
- Improving this `README` or adding other documentation to `framerr`.
- Letting [me] know if you're using `framerr`.[introduction]: #introduction
[examples]: #examples
[usage]: #usage
[contributing]: #contributing[go]: https://golang.org
[issues]: ./issues
[bug]: ./issues/new?labels=bug
[enhancement]: ./issues/new?labels=enhancement[me]: https://twitter.com/jrbowes