summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-12-08 15:32:03 +0100
committerTor Andersson <tor.andersson@artifex.com>2011-12-08 21:46:55 +0100
commit34c971b594bad41fa6c2ad4a9798e5a18de129b5 (patch)
tree0c3956c35f827d1649e0520abf18974a4e0ec8e2 /pdf
parente64a57b1e9c2ba6c6f54eff73c414be9e78dafbe (diff)
downloadmupdf-34c971b594bad41fa6c2ad4a9798e5a18de129b5.tar.xz
Throw exceptions for read errors.
Diffstat (limited to 'pdf')
-rw-r--r--pdf/pdf_xref.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pdf/pdf_xref.c b/pdf/pdf_xref.c
index b447dde6..65c695f6 100644
--- a/pdf/pdf_xref.c
+++ b/pdf/pdf_xref.c
@@ -424,7 +424,7 @@ pdf_read_xref_sections(pdf_xref *xref, int ofs, char *buf, int cap)
fz_catch(ctx)
{
fz_drop_obj(trailer);
- fz_throw(ctx, "Failed to read xref at offset %d", ofs);
+ fz_throw(ctx, "cannot read xref at offset %d", ofs);
}
fz_drop_obj(trailer);
@@ -675,6 +675,7 @@ pdf_open_xref_with_stream(fz_stream *file, char *password)
fz_drop_obj(xref->trailer);
xref->trailer = NULL;
}
+ fz_warn(xref->ctx, "trying to repair broken xref");
pdf_repair_xref(xref, xref->scratch, sizeof xref->scratch);
repaired = 1;
}