From dd0417569cddec14cbc517613d286efbd4e5f0e5 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 1 Jul 2009 12:22:32 +0200 Subject: Update mozilla plugin error handling. --- apps/mozilla/moz_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apps/mozilla/moz_main.c') 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); -- cgit v1.2.3