summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/windows/winmain.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/windows/winmain.c b/apps/windows/winmain.c
index cc7f3bdb..678736f1 100644
--- a/apps/windows/winmain.c
+++ b/apps/windows/winmain.c
@@ -109,7 +109,19 @@ void winwarn(pdfapp_t *app, char *msg)
void winerror(pdfapp_t *app, fz_error *error)
{
- MessageBoxA(hwndframe, error->msg, "MuPDF: Error", MB_ICONERROR);
+ char msg[4096];
+ char buf[200];
+
+ msg[0] = 0;
+
+ while (error)
+ {
+ sprintf(buf, "%s:%d: %s(): %s\n", error->file, error->line, error->func, error->msg);
+ strcat(msg, buf);
+ error = error->cause;
+ }
+
+ MessageBoxA(hwndframe, msg, "MuPDF: Error", MB_ICONERROR);
exit(1);
}