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

Function NewTextError

errctx/text_error.go:14–19  ·  view source on GitHub ↗

NewTextError creates a new [TextError] with the given message and options.

(msg string, stackSkip int, opts ...Option)

Source from the content-addressed store, hash-verified

12
13// NewTextError creates a new [TextError] with the given message and options.
14func NewTextError(msg string, stackSkip int, opts ...Option) *TextError {
15 return &TextError{
16 msg: msg,
17 ErrorContext: newErrorContext(stackSkip+1, opts...),
18 }
19}
20
21// Error returns the error message with prefix if set.
22func (e *TextError) Error() string {

Callers 15

newRequestSchemeErrorFunction · 0.92
newPartialResponseErrorFunction · 0.92
newResponseStatusErrorFunction · 0.92
newTooManyRedirectsErrorFunction · 0.92
newNotModifiedErrorFunction · 0.92
WrapErrorFunction · 0.92
newSourceAddressErrorFunction · 0.92
newSignatureErrorFunction · 0.92
newImageResolutionErrorFunction · 0.92
newSourceURLErrorFunction · 0.92
newVipsErrorFunction · 0.92

Calls 1

newErrorContextFunction · 0.85

Tested by 4

TestSpecialFieldsMethod · 0.74
TestSpecialFieldsMethod · 0.74
TestSpecialFieldsMethod · 0.74
TestIntoWithErrorMethod · 0.74