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

Function WithMessage

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

WithMessage annotates err with a new message. If err is nil, WithMessage returns nil. The message is considered safe for reporting and is included in Sentry reports.

(err error, msg string)

Source from the content-addressed store, hash-verified

90// The message is considered safe for reporting
91// and is included in Sentry reports.
92func WithMessage(err error, msg string) error { return errutil.WithMessage(err, msg) }
93
94// WithMessagef annotates err with the format specifier.
95// If err is nil, WithMessagef returns nil.

Callers 2

BenchmarkErrorsIsFunction · 0.92
EchoMethod · 0.92

Calls 1

WithMessageFunction · 0.92

Tested by 2

BenchmarkErrorsIsFunction · 0.74
EchoMethod · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…