1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-06-17 22:37:33 +02:00
Files
imgproxy/vips/errors.go

33 lines
624 B
Go
Raw Normal View History

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 newVipsErrorf(format string, args ...interface{}) error {
return ierrors.Wrap(VipsError(fmt.Sprintf(format, args...)), 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) }