MCPcopy Index your code
hub / github.com/cockroachdb/errors / UnwrapOnce

Function UnwrapOnce

errbase_api.go:30–30  ·  view source on GitHub ↗

UnwrapOnce accesses the direct cause of the error if any, otherwise returns nil. It supports both errors implementing causer (`Cause()` method, from github.com/pkg/errors) and `Wrapper` (`Unwrap()` method, from the Go 2 error proposal).

(err error)

Source from the content-addressed store, hash-verified

28// github.com/pkg/errors) and `Wrapper` (`Unwrap()` method, from the
29// Go 2 error proposal).
30func UnwrapOnce(err error) error { return errbase.UnwrapOnce(err) }
31
32// UnwrapAll accesses the root cause object of the error.
33// If the error has no cause (leaf error), it is returned directly.

Callers

nothing calls this directly

Calls 1

UnwrapOnceFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…