Errorf returns an Error with the specified publicMsgFormat and values. It always returns a vizerror.Error. Warning: avoid using an error as one of the format arguments, as this will cause the text of that error to be displayed to the end user (which is probably not what you want).
(publicMsgFormat string, a ...any)
| 36 | // Warning: avoid using an error as one of the format arguments, as this will cause the text |
| 37 | // of that error to be displayed to the end user (which is probably not what you want). |
| 38 | func Errorf(publicMsgFormat string, a ...any) error { |
| 39 | err := fmt.Errorf(publicMsgFormat, a...) |
| 40 | return Error{ |
| 41 | publicErr: err, |
| 42 | wrapped: err, |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | // Unwrap returns the underlying error. |
| 47 | // |
searching dependent graphs…