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

Function HandleAsAssertionFailureDepth

errutil/assertions.go:53–58  ·  view source on GitHub ↗

HandleAsAssertionFailureDepth is like HandleAsAssertionFailure but the depth at which the call stack is captured can be specified.

(depth int, origErr error)

Source from the content-addressed store, hash-verified

51// HandleAsAssertionFailureDepth is like HandleAsAssertionFailure but
52// the depth at which the call stack is captured can be specified.
53func HandleAsAssertionFailureDepth(depth int, origErr error) error {
54 err := barriers.Handled(origErr)
55 err = withstack.WithStackDepth(err, 1+depth)
56 err = assert.WithAssertionFailure(err)
57 return err
58}
59
60// NewAssertionErrorWithWrappedErrf wraps an error and turns it into
61// an assertion error. Both details from the original error and the

Callers 3

HandleAsAssertionFailureFunction · 0.92
HandleAsAssertionFailureFunction · 0.70

Calls 3

HandledFunction · 0.92
WithStackDepthFunction · 0.92
WithAssertionFailureFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…