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

Function NewAssertionErrorWithWrappedErrDepthf

errutil/assertions.go:73–80  ·  view source on GitHub ↗

NewAssertionErrorWithWrappedErrDepthf is like NewAssertionErrorWithWrappedErrf but the depth at which the call stack is captured can be specified. See the doc of `AssertionFailedf()` for more details.

(
	depth int, origErr error, format string, args ...interface{},
)

Source from the content-addressed store, hash-verified

71// stack is captured can be specified.
72// See the doc of `AssertionFailedf()` for more details.
73func NewAssertionErrorWithWrappedErrDepthf(
74 depth int, origErr error, format string, args ...interface{},
75) error {
76 err := barriers.Handled(origErr)
77 err = WrapWithDepthf(depth+1, err, format, args...)
78 err = assert.WithAssertionFailure(err)
79 return err
80}

Calls 3

HandledFunction · 0.92
WithAssertionFailureFunction · 0.92
WrapWithDepthfFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…