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

proxy.golang.org : github.com/fredbi/wrappable-errors

Package errors provide a wrappable error type. It is intended to use with sentinel errors or type assertions on errors, e.g. using errors.Is(). It generalizes the concept of wrapping errors already present with fmt.Errorf("... %w", err), but allows to wrap typed errors with a Wrap(err error) method. As its simplest, this package may be used to derive error values or types and proceed with type or value assertion on sentinel errors using Wrap() and Is() or As(). Runtime stack trace capture is provided as an optional addon (using WithStackTrace()). To capture the root cause of an error stack (i.e. the deepest error in the stack), one can use the Root() method.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/fredbi/wrappable-errors
License: Apache-2.0
Latest release: almost 2 years ago
First release: almost 2 years ago
Namespace: github.com/fredbi
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 19 days ago

    Loading...
    Readme
    Loading...