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

Function Wrap

errctx/wrapped_error.go:33–35  ·  view source on GitHub ↗

Wrap creates a new [WrappedError] with the given error and options. It gets the stack trace from the call site. If the provided error already an [Error], it clones its context and applies the new options to it. If the provided error is already an [WrappedError], it rewraps its inner error to avoid

(err error, opts ...Option)

Source from the content-addressed store, hash-verified

31// If the provided error is already an [WrappedError], it rewraps its inner error
32// to avoid double wrapping.
33func Wrap(err error, opts ...Option) Error {
34 return WrapWithStackSkip(err, 1, opts...)
35}
36
37// WrapWithStackSkip creates a new [WrappedError] with the given error and options.
38// It the first stackSkip frames from the call stack.

Callers 15

createBucketClientMethod · 0.92
handleErrorFunction · 0.92
ParsePathMethod · 0.92
ExecuteMethod · 0.92
newRequestMethod · 0.92
acquireWorkerMethod · 0.92
processImageMethod · 0.92
writeDebugHeadersMethod · 0.92
respondWithImageMethod · 0.92
CheckTimeoutFunction · 0.92

Calls 1

WrapWithStackSkipFunction · 0.85