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

Top 8.2% on proxy.golang.org

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

Package errors implements functions for manipulating errors. The traditional error handling idiom in Go is roughly akin to which applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error. The errors.Wrap function returns a new error that adds context to the original error. For example In addition, errors.Wrap records the file and line where it was called, allowing the programmer to retrieve the path to the original error. Using errors.Wrap constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to recerse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface Can be inspected by errors.Cause which will recursively retrieve the topmost error which does nor implement causer, which is assumed to be the original cause. For example:

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/ezioruan/errors
License: BSD-2-Clause
Latest release: about 9 years ago
First release: about 9 years ago
Namespace: github.com/ezioruan
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 3 days ago

    Loading...
    Readme
    Loading...