summaryrefslogtreecommitdiff
path: root/xps/xps_jpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'xps/xps_jpeg.c')
-rw-r--r--xps/xps_jpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xps/xps_jpeg.c b/xps/xps_jpeg.c
index 68bb5eb9..ad5e2569 100644
--- a/xps/xps_jpeg.c
+++ b/xps/xps_jpeg.c
@@ -64,7 +64,7 @@ xps_decode_jpeg(fz_pixmap **imagep, byte *rbuf, int rlen)
{
if (image)
fz_drop_pixmap(image);
- return fz_throw("jpeg error: %s", err.msg);
+ return fz_error_make("jpeg error: %s", err.msg);
}
cinfo.err = jpeg_std_error(&err.super);
@@ -92,14 +92,14 @@ xps_decode_jpeg(fz_pixmap **imagep, byte *rbuf, int rlen)
else if (cinfo.output_components == 4)
colorspace = fz_device_cmyk;
else
- return fz_throw("bad number of components in jpeg: %d", cinfo.output_components);
+ return fz_error_make("bad number of components in jpeg: %d", cinfo.output_components);
image = fz_new_pixmap_with_limit(colorspace, cinfo.output_width, cinfo.output_height);
if (!image)
{
jpeg_finish_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo);
- return fz_throw("out of memory");
+ return fz_error_make("out of memory");
}
if (cinfo.density_unit == 1)