diff options
Diffstat (limited to 'apps/pdfdraw.c')
-rw-r--r-- | apps/pdfdraw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c index a5f6aa1e..7a23acef 100644 --- a/apps/pdfdraw.c +++ b/apps/pdfdraw.c @@ -37,7 +37,7 @@ struct { static void die(fz_error error) { - fz_catch(error, "aborting"); + fz_error_handle(error, "aborting"); exit(1); } @@ -105,7 +105,7 @@ static void drawpage(pdf_xref *xref, int pagenum) error = pdf_load_page(&page, xref, pagenum - 1); if (error) - die(fz_rethrow(error, "cannot load page %d in file '%s'", pagenum, filename)); + die(fz_error_note(error, "cannot load page %d in file '%s'", pagenum, filename)); list = NULL; @@ -115,7 +115,7 @@ static void drawpage(pdf_xref *xref, int pagenum) dev = fz_new_list_device(list); error = pdf_run_page(xref, page, dev, fz_identity); if (error) - die(fz_rethrow(error, "cannot draw page %d in file '%s'", pagenum, filename)); + die(fz_error_note(error, "cannot draw page %d in file '%s'", pagenum, filename)); fz_free_device(dev); } @@ -369,11 +369,11 @@ int main(int argc, char **argv) error = pdf_open_xref(&xref, filename, password); if (error) - die(fz_rethrow(error, "cannot open document: %s", filename)); + die(fz_error_note(error, "cannot open document: %s", filename)); error = pdf_load_page_tree(xref); if (error) - die(fz_rethrow(error, "cannot load page tree: %s", filename)); + die(fz_error_note(error, "cannot load page tree: %s", filename)); if (showxml) printf("<document name=\"%s\">\n", filename); |