WrapCodeSkip wraps error with code and text. It returns nil if given err is nil. The parameter `skip` specifies the stack callers skipped amount.
(code gcode.Code, skip int, err error, text ...string)
| 85 | // It returns nil if given err is nil. |
| 86 | // The parameter `skip` specifies the stack callers skipped amount. |
| 87 | func WrapCodeSkip(code gcode.Code, skip int, err error, text ...string) error { |
| 88 | if err == nil { |
| 89 | return nil |
| 90 | } |
| 91 | return &Error{ |
| 92 | error: err, |
| 93 | stack: callers(skip), |
| 94 | text: strings.Join(text, commaSeparatorSpace), |
| 95 | code: code, |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | // WrapCodeSkipf wraps error with code and text that is formatted with given format and args. |
| 100 | // It returns nil if given err is nil. |
searching dependent graphs…