summaryrefslogtreecommitdiff
path: root/fitz/stm_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/stm_read.c')
-rw-r--r--fitz/stm_read.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fitz/stm_read.c b/fitz/stm_read.c
index 59f06433..89811333 100644
--- a/fitz/stm_read.c
+++ b/fitz/stm_read.c
@@ -23,7 +23,7 @@ fz_read(fz_stream *stm, unsigned char *buf, int len)
if (n < 0)
{
stm->error = 1;
- return fz_rethrow(n, "read error");
+ return fz_error_note(n, "read error");
}
else if (n == 0)
{
@@ -50,7 +50,7 @@ fz_read(fz_stream *stm, unsigned char *buf, int len)
if (n < 0)
{
stm->error = 1;
- return fz_rethrow(n, "read error");
+ return fz_error_note(n, "read error");
}
else if (n == 0)
{
@@ -80,7 +80,7 @@ fz_fill_buffer(fz_stream *stm)
if (n < 0)
{
stm->error = 1;
- fz_catch(n, "read error; treating as end of file");
+ fz_error_handle(n, "read error; treating as end of file");
}
else if (n == 0)
{
@@ -113,14 +113,14 @@ fz_read_all(fz_buffer **bufp, fz_stream *stm, int initial)
if (buf->len / 200 > initial)
{
fz_drop_buffer(buf);
- return fz_throw("compression bomb detected");
+ return fz_error_make("compression bomb detected");
}
n = fz_read(stm, buf->data + buf->len, buf->cap - buf->len);
if (n < 0)
{
fz_drop_buffer(buf);
- return fz_rethrow(n, "read error");
+ return fz_error_note(n, "read error");
}
if (n == 0)
break;