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

Function HasAssertionFailure

assert/assert.go:43–49  ·  view source on GitHub ↗

HasAssertionFailure returns true if the error or any of its causes is an assertion failure annotation.

(err error)

Source from the content-addressed store, hash-verified

41// HasAssertionFailure returns true if the error or any of its causes
42// is an assertion failure annotation.
43func HasAssertionFailure(err error) bool {
44 _, ok := markers.If(err, func(err error) (v interface{}, ok bool) {
45 v, ok = err.(*withAssertionFailure)
46 return
47 })
48 return ok
49}
50
51// IsAssertionFailure returns true if the error (not its causes) is an
52// assertion failure annotation. Consider using markers.If or

Callers 2

HasAssertionFailureFunction · 0.92
TestAssertFunction · 0.92

Calls 1

IfFunction · 0.92

Tested by 1

TestAssertFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…