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)
| 53 | // provided domain as new domain. The original error message |
| 54 | // is preserved. |
| 55 | func 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(). |
| 60 | type DomainOverrideFn = func(originalDomain Domain, err error) error |
nothing calls this directly
no test coverage detected
searching dependent graphs…