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

Function ErrorType

errctx/error.go:39–44  ·  view source on GitHub ↗

ErrorType returns the type name of the given error. If the error is [WrappedError], it returns the type of the inner error.

(err error)

Source from the content-addressed store, hash-verified

37// ErrorType returns the type name of the given error.
38// If the error is [WrappedError], it returns the type of the inner error.
39func ErrorType(err error) string {
40 if ew, ok := err.(*WrappedError); ok {
41 return ErrorType(ew.Unwrap())
42 }
43 return reflect.TypeOf(err).String()
44}

Callers 6

ReportMethod · 0.92
ReportMethod · 0.92
ReportMethod · 0.92
ReportMethod · 0.92
unwrapErrorChainFunction · 0.92
FormatErrTypeFunction · 0.92

Calls 2

UnwrapMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected