New acts as pkg/errors.New does, producing a stack traced error, but supports interpolating of message parameters. Use this when you want the stack trace to start at the place you create the error.
(msg string, args ...interface{})
| 39 | // interpolating of message parameters. Use this when you want the stack trace to start at |
| 40 | // the place you create the error. |
| 41 | func New(msg string, args ...interface{}) error { |
| 42 | return PopStack(errors.New(fmt.Sprintf(msg, args...))) |
| 43 | } |
| 44 | |
| 45 | // Wrap creates a new error from a cause, decorating the original error message with a |
| 46 | // prefix. |