Errorf formats according to a format specifier and returns the string as a value that satisfies error. Errorf also records the stack trace at the point it was called. Use this for Vitess-specific errors that don't have a MySQL counterpart
(code vtrpcpb.Code, format string, args ...any)
| 141 | // Errorf also records the stack trace at the point it was called. |
| 142 | // Use this for Vitess-specific errors that don't have a MySQL counterpart |
| 143 | func Errorf(code vtrpcpb.Code, format string, args ...any) error { |
| 144 | return &fundamental{ |
| 145 | msg: fmt.Sprintf(format, args...), |
| 146 | code: code, |
| 147 | stack: callers(), |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | // NewErrorf formats according to a format specifier and returns the string |
| 152 | // as a value that satisfies error. |
searching dependent graphs…