MCPcopy Create free account
hub / github.com/cockroachdb/errors / NotInDomain

Function NotInDomain

domains/domains.go:105–107  ·  view source on GitHub ↗

Handledf with format and args can be implemented similarly. NotInDomain returns true if and only if the error's domain is not one of the specified domains.

(err error, domains ...Domain)

Source from the content-addressed store, hash-verified

103// NotInDomain returns true if and only if the error's
104// domain is not one of the specified domains.
105func NotInDomain(err error, domains ...Domain) bool {
106 return notInDomainInternal(GetDomain(err), domains...)
107}
108
109func notInDomainInternal(d Domain, domains ...Domain) bool {
110 for _, given := range domains {

Callers 8

NotInDomainFunction · 0.92
TestNoDomainFunction · 0.92
TestNamedDomainFunction · 0.92
TestWrappedDomainFunction · 0.92
TestPackageDomainFunction · 0.92
TestWithDomainFunction · 0.92
TestHandledInDomainFunction · 0.92
TestHandledFunction · 0.92

Calls 2

notInDomainInternalFunction · 0.85
GetDomainFunction · 0.70

Tested by 7

TestNoDomainFunction · 0.74
TestNamedDomainFunction · 0.74
TestWrappedDomainFunction · 0.74
TestPackageDomainFunction · 0.74
TestWithDomainFunction · 0.74
TestHandledInDomainFunction · 0.74
TestHandledFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…