Files
imgproxy/vips/errors.go
2025-07-23 19:47:22 +06:00

29 lines
493 B
Go

package vips
import (
"fmt"
"github.com/imgproxy/imgproxy/v3/ierrors"
)
type (
VipsError string
ColorError string
)
func newVipsError(msg string) error {
return ierrors.Wrap(VipsError(msg), 1)
}
func (e VipsError) Error() string { return string(e) }
func newColorError(format string, args ...interface{}) error {
return ierrors.Wrap(
ColorError(fmt.Sprintf(format, args...)),
1,
ierrors.WithShouldReport(false),
)
}
func (e ColorError) Error() string { return string(e) }