errors.go 333 B

12345678910111213141516171819
  1. package color
  2. import (
  3. "fmt"
  4. "github.com/imgproxy/imgproxy/v3/ierrors"
  5. )
  6. type ColorError string
  7. func newColorError(format string, args ...interface{}) error {
  8. return ierrors.Wrap(
  9. ColorError(fmt.Sprintf(format, args...)),
  10. 1,
  11. ierrors.WithShouldReport(false),
  12. )
  13. }
  14. func (e ColorError) Error() string { return string(e) }