summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-11-03 22:23:32 +0000
committerCarl Hetherington <cth@carlh.net>2015-11-03 22:23:32 +0000
commitb5317f407471b04b3c3a6d9e23c81efcd32d0a1a (patch)
tree9a79e545670e4956e97e6b0ec17e26175e4cac22 /src
parentb433301b600bfe105837943f1d8ea20a01b1d715 (diff)
Improve reporting of unhandled exceptions.
Diffstat (limited to 'src')
-rw-r--r--src/tools/dcpomatic.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 47237eee6..28198a685 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -926,8 +926,7 @@ private:
return true;
}
- /* An unhandled exception has occurred inside the main event loop */
- bool OnExceptionInMainLoop ()
+ void report_exception ()
{
try {
throw;
@@ -951,14 +950,19 @@ private:
} catch (...) {
error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
}
+ }
+ /* An unhandled exception has occurred inside the main event loop */
+ bool OnExceptionInMainLoop ()
+ {
+ report_exception ();
/* This will terminate the program */
return false;
}
void OnUnhandledException ()
{
- error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
+ report_exception ();
}
void idle ()