NewCodeSkipf returns an error that has error code and formats as the given format and args. The parameter `skip` specifies the stack callers skipped amount.
(code gcode.Code, skip int, format string, args ...any)
| 44 | // NewCodeSkipf returns an error that has error code and formats as the given format and args. |
| 45 | // The parameter `skip` specifies the stack callers skipped amount. |
| 46 | func NewCodeSkipf(code gcode.Code, skip int, format string, args ...any) error { |
| 47 | return &Error{ |
| 48 | stack: callers(skip), |
| 49 | text: format, |
| 50 | args: args, |
| 51 | code: code, |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // WrapCode wraps error with code and text. |
| 56 | // It returns nil if given err is nil. |
searching dependent graphs…