NewSkipf returns an error that formats as the given format and args. The parameter `skip` specifies the stack callers skipped amount.
(skip int, format string, args ...any)
| 42 | // NewSkipf returns an error that formats as the given format and args. |
| 43 | // The parameter `skip` specifies the stack callers skipped amount. |
| 44 | func NewSkipf(skip int, format string, args ...any) error { |
| 45 | return &Error{ |
| 46 | stack: callers(skip), |
| 47 | text: format, |
| 48 | args: args, |
| 49 | code: gcode.CodeNil, |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | // Wrap wraps error with text. It returns nil if given err is nil. |
| 54 | // Note that it does not lose the error code of wrapped error, as it inherits the error code from it. |
searching dependent graphs…