summaryrefslogtreecommitdiff
path: root/apps/unix/x11pdf.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2008-03-27 14:56:33 +0100
committerTor Andersson <tor@ghostscript.com>2008-03-27 14:56:33 +0100
commita86a6c38e2be0d46c8f95964611111bef427e7c5 (patch)
tree1828b7394ab3c25ab8a471fa9dcc23cc187d0854 /apps/unix/x11pdf.c
parentf99152119818762bab738416d789b850a83659e2 (diff)
downloadmupdf-a86a6c38e2be0d46c8f95964611111bef427e7c5.tar.xz
Fix error message handling in pdfapp.
Diffstat (limited to 'apps/unix/x11pdf.c')
-rw-r--r--apps/unix/x11pdf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/unix/x11pdf.c b/apps/unix/x11pdf.c
index baedbe09..d9f0d036 100644
--- a/apps/unix/x11pdf.c
+++ b/apps/unix/x11pdf.c
@@ -57,9 +57,9 @@ void winwarn(pdfapp_t *app, char *msg)
fprintf(stderr, "apparition: %s\n", msg);
}
-void winerror(pdfapp_t *app, char *msg)
+void winerror(pdfapp_t *app, fz_error *error)
{
- fprintf(stderr, "apparition: %s\n", msg);
+ fz_printerror(error);
exit(1);
}
@@ -80,7 +80,7 @@ void winopen(void)
xdpy = XOpenDisplay(nil);
if (!xdpy)
- winerror(&gapp, "could not open display.");
+ winerror(&gapp, fz_throw("could not open display"));
XA_TARGETS = XInternAtom(xdpy, "TARGETS", False);
XA_TIMESTAMP = XInternAtom(xdpy, "TIMESTAMP", False);