WrapWithDepthf wraps an error. It also annotates the provided pg code as new candidate code, to be used if the underlying error does not have one already.
(depth int, err error, code, format string, args ...interface{})
| 22 | // pg code as new candidate code, to be used if the underlying |
| 23 | // error does not have one already. |
| 24 | func WrapWithDepthf(depth int, err error, code, format string, args ...interface{}) error { |
| 25 | err = errors.WrapWithDepthf(1+depth, err, format, args...) |
| 26 | err = WithCandidateCode(err, code) |
| 27 | return err |
| 28 | } |
| 29 | |
| 30 | // Wrap wraps an error and adds a pg error code. Only the code |
| 31 | // is added if the message is empty. |
no test coverage detected
searching dependent graphs…