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

Function WithStackDepth

withstack/withstack.go:46–51  ·  view source on GitHub ↗

WithStackDepth annotates err with a stack trace starting from the given call depth. The value zero identifies the caller of WithStackDepth itself. See the documentation of WithStack() for more details.

(err error, depth int)

Source from the content-addressed store, hash-verified

44// of WithStackDepth itself.
45// See the documentation of WithStack() for more details.
46func WithStackDepth(err error, depth int) error {
47 if err == nil {
48 return nil
49 }
50 return &withStack{cause: err, stack: callers(depth + 1)}
51}
52
53type withStack struct {
54 cause error

Callers 10

WithStackFunction · 0.92
WithStackDepthFunction · 0.92
NewWithDepthFunction · 0.92
NewWithDepthfFunction · 0.92
WrapWithDepthFunction · 0.92
WrapWithDepthfFunction · 0.92
JoinWithDepthFunction · 0.92
makeErr4Function · 0.92
WithStackFunction · 0.70

Calls 1

callersFunction · 0.85

Tested by 1

makeErr4Function · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…