MCPcopy Create free account
hub / github.com/chain/Core / Root

Function Root

errors/errors.go:31–36  ·  view source on GitHub ↗

Root returns the original error that was wrapped by one or more calls to Wrap. If e does not wrap other errors, it will be returned as-is.

(e error)

Source from the content-addressed store, hash-verified

29// calls to Wrap. If e does not wrap other errors, it will be returned
30// as-is.
31func Root(e error) error {
32 if wErr, ok := e.(wrapperError); ok {
33 return wErr.root
34 }
35 return e
36}
37
38// wrap adds a context message and stack trace to err and returns a new error
39// containing the new context. This function is meant to be composed within

Callers 4

TestWrapFunction · 0.70
TestDetailFunction · 0.70
TestDataFunction · 0.70
SubFunction · 0.70

Calls

no outgoing calls

Tested by 3

TestWrapFunction · 0.56
TestDetailFunction · 0.56
TestDataFunction · 0.56