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

Function EnsureNotInDomain

domains_api.go:55–57  ·  view source on GitHub ↗

EnsureNotInDomain checks whether the error is in the given domain(s). If it is, the given constructor if provided is called to construct an alternate error. If no error constructor is provided, a new barrier is constructed automatically using the first provided domain as new domain. The original err

(err error, constructor DomainOverrideFn, forbiddenDomains ...Domain)

Source from the content-addressed store, hash-verified

53// provided domain as new domain. The original error message
54// is preserved.
55func EnsureNotInDomain(err error, constructor DomainOverrideFn, forbiddenDomains ...Domain) error {
56 return domains.EnsureNotInDomain(err, constructor, forbiddenDomains...)
57}
58
59// DomainOverrideFn is the type of the callback function passed to EnsureNotInDomain().
60type DomainOverrideFn = func(originalDomain Domain, err error) error

Callers

nothing calls this directly

Calls 1

EnsureNotInDomainFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…