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

Function UnwrapAll

errbase/unwrap.go:53–62  ·  view source on GitHub ↗

UnwrapAll accesses the root cause object of the error. If the error has no cause (leaf error), it is returned directly. UnwrapAll treats multi-errors as leaf nodes.

(err error)

Source from the content-addressed store, hash-verified

51// If the error has no cause (leaf error), it is returned directly.
52// UnwrapAll treats multi-errors as leaf nodes.
53func UnwrapAll(err error) error {
54 for {
55 if cause := UnwrapOnce(err); cause != nil {
56 err = cause
57 continue
58 }
59 break
60 }
61 return err
62}
63
64// UnwrapMulti access the slice of causes that an error contains, if it is a
65// multi-error.

Callers 7

CauseFunction · 0.92
UnwrapAllFunction · 0.92
HasUnimplementedErrorFunction · 0.92
TestUnimplementedErrorFunction · 0.92
TestUnwrapFunction · 0.92
TestMixedErrorWrappingFunction · 0.92
TestMultiErrorUnwrapFunction · 0.92

Calls 1

UnwrapOnceFunction · 0.70

Tested by 4

TestUnimplementedErrorFunction · 0.74
TestUnwrapFunction · 0.74
TestMixedErrorWrappingFunction · 0.74
TestMultiErrorUnwrapFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…