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

Function Wrap

errutil_api.go:115–115  ·  view source on GitHub ↗

Wrap wraps an error with a message prefix. A stack trace is retained. Note: the prefix string is assumed to not contain PII and is included in Sentry reports. Use errors.Wrapf(err, "%s", ) for errors strings that may contain PII information. Detail output: - original error message +

(err error, msg string)

Source from the content-addressed store, hash-verified

113// - stack trace and message via `errors.GetSafeDetails()`.
114// - stack trace and message in Sentry reports.
115func Wrap(err error, msg string) error { return errutil.WrapWithDepth(1, err, msg) }
116
117// WrapWithDepth is like Wrap except the depth to capture the stack
118// trace is configurable.

Callers 4

BenchmarkErrorsIsFunction · 0.92
TestErrorPredicatesUnixFunction · 0.92
TestErrorPredicatesFunction · 0.92
TestAsFunction · 0.92

Calls 1

WrapWithDepthFunction · 0.92

Tested by 4

BenchmarkErrorsIsFunction · 0.74
TestErrorPredicatesUnixFunction · 0.74
TestErrorPredicatesFunction · 0.74
TestAsFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…