NewCodef returns an error that has error code and formats as the given format and args.
(code gcode.Code, format string, args ...any)
| 23 | |
| 24 | // NewCodef returns an error that has error code and formats as the given format and args. |
| 25 | func NewCodef(code gcode.Code, format string, args ...any) error { |
| 26 | return &Error{ |
| 27 | stack: callers(), |
| 28 | text: format, |
| 29 | args: args, |
| 30 | code: code, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // NewCodeSkip creates and returns an error which has error code and is formatted from given text. |
| 35 | // The parameter `skip` specifies the stack callers skipped amount. |
searching dependent graphs…