From 29d53a0a460e00b3ec9dda508adbd2964077ab27 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 27 Apr 2016 17:00:29 +0200 Subject: Fix 696649: remove fz_rethrow_message calls. --- source/tools/mjsgen.c | 14 ++------------ source/tools/mudraw.c | 16 +++------------- 2 files changed, 5 insertions(+), 25 deletions(-) (limited to 'source/tools') diff --git a/source/tools/mjsgen.c b/source/tools/mjsgen.c index d1366062..37f315bc 100644 --- a/source/tools/mjsgen.c +++ b/source/tools/mjsgen.c @@ -95,20 +95,10 @@ static void escape_string(FILE *out, int len, const char *string) static void processpage(fz_context *ctx, fz_document *doc, int pagenum) { - fz_page *page; - int needshot = 0; - - fz_try(ctx) - { - page = fz_load_page(ctx, doc, pagenum - 1); - } - fz_catch(ctx) - { - fz_rethrow_message(ctx, "cannot load page %d in file '%s'", pagenum, filename); - } - + fz_page *page = fz_load_page(ctx, doc, pagenum - 1); pdf_document *inter = pdf_specifics(ctx, doc); pdf_widget *widget = NULL; + int needshot = 0; if (inter) widget = pdf_first_widget(inter, (pdf_page *)page); diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index 120c166d..9e72b652 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -489,10 +489,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) if (showtime) start = gettime(); - fz_try(ctx) - page = fz_load_page(ctx, doc, pagenum - 1); - fz_catch(ctx) - fz_rethrow_message(ctx, "cannot load page %d in file '%s'", pagenum, filename); + page = fz_load_page(ctx, doc, pagenum - 1); if (showmd5 || showtime || showfeatures) fprintf(stderr, "page %s %d", filename, pagenum); @@ -532,7 +529,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) { fz_drop_display_list(ctx, list); fz_drop_page(ctx, page); - fz_rethrow_message(ctx, "cannot draw page %d in file '%s'", pagenum, filename); + fz_rethrow(ctx); } } @@ -1422,14 +1419,7 @@ int mudraw_main(int argc, char **argv) filename = argv[fz_optind++]; files++; - fz_try(ctx) - { - doc = fz_open_document(ctx, filename); - } - fz_catch(ctx) - { - fz_rethrow_message(ctx, "cannot open document: %s", filename); - } + doc = fz_open_document(ctx, filename); if (fz_needs_password(ctx, doc)) { -- cgit v1.2.3