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

Function HandleAsAssertionFailure

errutil/assertions.go:47–49  ·  view source on GitHub ↗

HandleAsAssertionFailure hides an error and turns it into an assertion failure. Both details from the original error and the context of the caller are preserved. The original error is not visible as cause any more. The original error message is preserved. See the doc of `AssertionFailedf()` for more

(origErr error)

Source from the content-addressed store, hash-verified

45// visible as cause any more. The original error message is preserved.
46// See the doc of `AssertionFailedf()` for more details.
47func HandleAsAssertionFailure(origErr error) error {
48 return HandleAsAssertionFailureDepth(1, origErr)
49}
50
51// HandleAsAssertionFailureDepth is like HandleAsAssertionFailure but
52// the depth at which the call stack is captured can be specified.

Callers 1

datadriven_test.goFile · 0.92

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…