MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / newErrorContext

Function newErrorContext

errctx/context.go:20–30  ·  view source on GitHub ↗
(stackSkip int, opts ...Option)

Source from the content-addressed store, hash-verified

18}
19
20func 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
32func (ec *ErrorContext) CloneErrorContext(opts ...Option) *ErrorContext {
33 newEc := *ec

Callers 3

NewWrappedErrorFunction · 0.85
WrapWithStackSkipFunction · 0.85
NewTextErrorFunction · 0.85

Calls 2

applyOptionsMethod · 0.95
callersFunction · 0.70

Tested by

no test coverage detected