Newf/Errorf with format and args can be implemented similarly. HandledInDomain creates an error in the given domain and retains the details of the given original error as context for debugging. The original error is hidden and does not become a "cause" for the new error. The original's error _messag
(err error, domain Domain)
| 82 | // |
| 83 | // See the documentation of `WithDomain()` and `errors.Handled()` for details. |
| 84 | func HandledInDomain(err error, domain Domain) error { |
| 85 | return WithDomain(barriers.Handled(err), domain) |
| 86 | } |
| 87 | |
| 88 | // HandledInDomainWithMessage is like HandledWithMessage but with a domain. |
| 89 | func HandledInDomainWithMessage(err error, domain Domain, msg string) error { |
searching dependent graphs…