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

Function WithMessagef

errutil/message.go:37–45  ·  view source on GitHub ↗

WithMessagef annotates err with the format specifier. If err is nil, WithMessagef returns nil. The message is formatted as per redact.Sprintf, to separate safe and unsafe strings for Sentry reporting.

(err error, format string, args ...interface{})

Source from the content-addressed store, hash-verified

35// The message is formatted as per redact.Sprintf,
36// to separate safe and unsafe strings for Sentry reporting.
37func WithMessagef(err error, format string, args ...interface{}) error {
38 if err == nil {
39 return nil
40 }
41 return &withPrefix{
42 cause: err,
43 prefix: redact.Sprintf(format, args...),
44 }
45}

Callers 2

WithMessagefFunction · 0.92
WrapWithDepthfFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…