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

Function WithAssertionFailure

assert/assert.go:34–39  ·  view source on GitHub ↗

WithAssertionFailure decorates the error with an assertion failure marker. This is not intended to be used directly (see AssertionFailed() for further decoration). Detail is shown: - when formatting with `%+v`. - in Sentry reports.

(err error)

Source from the content-addressed store, hash-verified

32// - when formatting with `%+v`.
33// - in Sentry reports.
34func WithAssertionFailure(err error) error {
35 if err == nil {
36 return nil
37 }
38 return &withAssertionFailure{cause: err}
39}
40
41// HasAssertionFailure returns true if the error or any of its causes
42// is an assertion failure annotation.

Callers 7

WithAssertionFailureFunction · 0.92
TestAssertFunction · 0.92
TestFormatFunction · 0.92
TestAssertionHintsFunction · 0.92

Calls

no outgoing calls

Tested by 3

TestAssertFunction · 0.74
TestFormatFunction · 0.74
TestAssertionHintsFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…