New returns a new error from the definition. This is not required, but will add a stack trace for improved debugging.
()
| 323 | // New returns a new error from the definition. This is not required, but will |
| 324 | // add a stack trace for improved debugging. |
| 325 | func (d *Definition) New() *Error { |
| 326 | if d == nil { |
| 327 | return nil |
| 328 | } |
| 329 | return build(d, 0) // Don't refactor this to build(...).WithCause(...) |
| 330 | } |