Apply new errors processing to more code parts

This commit is contained in:
DarthSim
2025-02-18 17:35:13 +03:00
parent 2145a66174
commit 3550042a16
16 changed files with 109 additions and 57 deletions

View File

@@ -3,7 +3,6 @@ package processing
import (
"context"
"errors"
"fmt"
"runtime"
"strconv"
@@ -301,7 +300,7 @@ func ProcessImage(ctx context.Context, imgdata *imagedata.ImageData, po *options
}
if !vips.SupportsSave(po.Format) {
return nil, fmt.Errorf("Can't save %s, probably not supported by your libvips", po.Format)
return nil, newSaveFormatError(po.Format)
}
if po.Format.SupportsAnimationSave() && animated {