An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 6.6% on proxy.golang.org
Top 3.4% dependent packages on proxy.golang.org
Top 2.5% dependent repos on proxy.golang.org
Top 8.8% forks on proxy.golang.org

proxy.golang.org : github.com/bdlm/errors

Package errors provides simple, concise, useful error handling and annotation. One of the biggest frustrations with Go error handling is the lack of forensic and meta information errors can provide. Out of the box errors are just a string and possibly a type. They can't tell you where they occurred or the path through the call stack they followed. The error implementation in Go is robust enough to control program flow but it's not very efficient for troubleshooting or analysis. Since the idom in Go is that we pass the error back up the stack anyway: it's trivial to make errors much more informative with a simple error package. This package makes this easy and supports tracing the call stack and the error callers with relative ease. Custom error types are also fully compatible with this package and can be used freely. Create an error: Create an error using formatting verbs: Wrap an error: Wrap an error with another error: Get the previous error, if any: Test for a specific error type: Test to see if a specific error type exists anywhere in an error stack: Iterate through an error stack:

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/bdlm/errors
Keywords: error-stacks , errors , exceptions , go , golang , stack-trace
License: BSD-3-Clause
Latest release: about 6 years ago
First release: over 7 years ago
Namespace: github.com/bdlm
Dependent packages: 3
Dependent repositories: 4
Stars: 6 on GitHub
Forks: 4 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 19 days ago

    Loading...
    Readme
    Loading...