Wrapf wraps an error with a formatted message prefix. A stack trace is also retained. If the format is empty, no prefix is added, but the extra arguments are still processed for reportable strings. Note: the format string is assumed to not contain PII and is included in Sentry reports. Use errors.W
(err error, format string, args ...interface{})
| 136 | // - stack trace, format, and redacted details via `errors.GetSafeDetails()`. |
| 137 | // - stack trace, format, and redacted details in Sentry reports. |
| 138 | func Wrapf(err error, format string, args ...interface{}) error { |
| 139 | return errutil.WrapWithDepthf(1, err, format, args...) |
| 140 | } |
| 141 | |
| 142 | // WrapWithDepthf is like Wrapf except the depth to capture the stack |
| 143 | // trace is configurable. |
nothing calls this directly
no test coverage detected
searching dependent graphs…