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)
| 35 | // - stack trace and message via `errors.GetSafeDetails()`. |
| 36 | // - stack trace and message in Sentry reports. |
| 37 | func 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. |
no test coverage detected