summaryrefslogtreecommitdiff
path: root/apps/mozilla
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2009-07-01 12:22:32 +0200
committerTor Andersson <tor@ghostscript.com>2009-07-01 12:22:32 +0200
commitdd0417569cddec14cbc517613d286efbd4e5f0e5 (patch)
tree0cd6c1e1c9272cccd00d0470109bbb239c3c019b /apps/mozilla
parent4e338fa918babb5e49e2323d057f70d94fb44cd2 (diff)
downloadmupdf-dd0417569cddec14cbc517613d286efbd4e5f0e5.tar.xz
Update mozilla plugin error handling.
Diffstat (limited to 'apps/mozilla')
-rw-r--r--apps/mozilla/moz_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/mozilla/moz_main.c b/apps/mozilla/moz_main.c
index bf393353..894a6280 100644
--- a/apps/mozilla/moz_main.c
+++ b/apps/mozilla/moz_main.c
@@ -63,9 +63,9 @@ void pdfmoz_warn(pdfmoz_t *moz, const char *fmt, ...)
void pdfmoz_error(pdfmoz_t *moz, fz_error error)
{
- strcpy(moz->error, error->msg);
+ fz_catch(error, "unhandled error");
InvalidateRect(moz->hwnd, NULL, FALSE);
- NPN_Status(moz->inst, moz->error);
+ NPN_Status(moz->inst, "mupdf error");
}
void pdfmoz_open(pdfmoz_t *moz, char *filename)
@@ -98,8 +98,6 @@ void pdfmoz_open(pdfmoz_t *moz, char *filename)
error = pdf_loadxref(moz->xref, filename);
if (error)
{
- if (!strncmp(error->msg, "ioerror", 7))
- pdfmoz_error(moz, error);
error = pdf_repairxref(moz->xref, filename);
if (error)
pdfmoz_error(moz, error);