(stackSkip int, opts ...Option)
| 18 | } |
| 19 | |
| 20 | func newErrorContext(stackSkip int, opts ...Option) *ErrorContext { |
| 21 | ec := &ErrorContext{ |
| 22 | statusCode: http.StatusInternalServerError, |
| 23 | publicMsg: "Internal error", |
| 24 | shouldReport: true, |
| 25 | |
| 26 | stack: callers(stackSkip + 1), |
| 27 | } |
| 28 | |
| 29 | return ec.applyOptions(opts...) |
| 30 | } |
| 31 | |
| 32 | func (ec *ErrorContext) CloneErrorContext(opts ...Option) *ErrorContext { |
| 33 | newEc := *ec |
no test coverage detected