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

Function Newf

errutil/utilities.go:59–61  ·  view source on GitHub ↗

Newf creates an error with a formatted error message. A stack trace is retained. Note: the format string is assumed to not contain PII and is included in Sentry reports. Use errors.Newf("%s", ) for errors strings that may contain PII information. See the doc of `New()` for more detai

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

Source from the content-addressed store, hash-verified

57//
58// See the doc of `New()` for more details.
59func Newf(format string, args ...interface{}) error {
60 return NewWithDepthf(1, format, args...)
61}
62
63// NewWithDepthf is like Newf() except the depth to capture the stack
64// trace is configurable.

Callers 3

TestFormatFunction · 0.92
TestFormatViaRedactFunction · 0.92
datadriven_test.goFile · 0.92

Calls 1

NewWithDepthfFunction · 0.70

Tested by 2

TestFormatFunction · 0.74
TestFormatViaRedactFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…