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

Function New

errutil/utilities.go:37–39  ·  view source on GitHub ↗

New creates an error with a simple error message. A stack trace is retained. Note: the message 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. Detail output: - message via `Error()` a

(msg string)

Source from the content-addressed store, hash-verified

35// - stack trace and message via `errors.GetSafeDetails()`.
36// - stack trace and message in Sentry reports.
37func New(msg string) error {
38 return NewWithDepth(1, msg)
39}
40
41// NewWithDepth is like New() except the depth to capture the stack
42// trace is configurable.

Callers 1

datadriven_test.goFile · 0.92

Calls 1

NewWithDepthFunction · 0.70

Tested by

no test coverage detected