NewCode creates and returns an error that has error code and given text.
(code gcode.Code, text ...string)
| 14 | |
| 15 | // NewCode creates and returns an error that has error code and given text. |
| 16 | func NewCode(code gcode.Code, text ...string) error { |
| 17 | return &Error{ |
| 18 | stack: callers(), |
| 19 | text: strings.Join(text, commaSeparatorSpace), |
| 20 | code: code, |
| 21 | } |
| 22 | } |
| 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 { |
searching dependent graphs…