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)
| 42 | // - stack trace and message via `errors.GetSafeDetails()`. |
| 43 | // - stack trace and message in Sentry reports. |
| 44 | func New(msg string) error { return errutil.NewWithDepth(1, msg) } |
| 45 | |
| 46 | // NewWithDepth is like New() except the depth to capture the stack |
| 47 | // trace is configurable. |