summaryrefslogtreecommitdiff
path: root/apps/xpsdraw.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-12-08 23:10:18 +0100
committerTor Andersson <tor.andersson@artifex.com>2011-12-08 23:10:18 +0100
commit62ff8552500694c96b998d2aac6fbc47ab2d9395 (patch)
tree570f959104e1dafe49edf553120f0ed9a0b60709 /apps/xpsdraw.c
parent6796e89abefe67ea1e35e5f40f6a77620b6de9d8 (diff)
downloadmupdf-62ff8552500694c96b998d2aac6fbc47ab2d9395.tar.xz
Remove deprecated error handling code.
Diffstat (limited to 'apps/xpsdraw.c')
-rw-r--r--apps/xpsdraw.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/apps/xpsdraw.c b/apps/xpsdraw.c
index 4ac40b72..8b15ef3e 100644
--- a/apps/xpsdraw.c
+++ b/apps/xpsdraw.c
@@ -29,12 +29,6 @@ struct {
int minpage, maxpage;
} timing;
-static void die(fz_error error)
-{
- fz_error_handle(error, "aborting");
- exit(1);
-}
-
static void usage(void)
{
fprintf(stderr,
@@ -99,14 +93,7 @@ static void drawpage(xps_document *doc, int pagenum)
start = gettime();
}
- fz_try(doc->ctx)
- {
- page = xps_load_page(doc, pagenum - 1);
- }
- fz_catch(doc->ctx)
- {
- die(fz_error_note(1, "cannot load page %d in file '%s'", pagenum, filename));
- }
+ page = xps_load_page(doc, pagenum - 1);
list = NULL;
@@ -358,14 +345,7 @@ int main(int argc, char **argv)
{
filename = argv[fz_optind++];
- fz_try(ctx)
- {
- doc = xps_open_file(ctx, filename);
- }
- fz_catch(ctx)
- {
- die(fz_error_note(-1, "cannot open document: %s", filename));
- }
+ doc = xps_open_file(ctx, filename);
if (showxml)
printf("<document name=\"%s\">\n", filename);