MCPcopy Index your code
hub / github.com/cockroachdb/errors / Wrapf

Function Wrapf

errutil/utilities.go:136–138  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

134// - stack trace, format, and redacted details via `errors.GetSafeDetails()`.
135// - stack trace, format, and redacted details in Sentry reports.
136func Wrapf(err error, format string, args ...interface{}) error {
137 return WrapWithDepthf(1, err, format, args...)
138}
139
140// WrapWithDepthf is like Wrapf except the depth to capture the stack
141// trace is configurable.

Callers 2

TestFormatFunction · 0.92
datadriven_test.goFile · 0.92

Calls 1

WrapWithDepthfFunction · 0.70

Tested by 1

TestFormatFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…