summaryrefslogtreecommitdiff
path: root/src/tools/dcpomatic.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-09-03 22:12:54 +0100
committerCarl Hetherington <cth@carlh.net>2014-09-03 22:12:54 +0100
commit42ff121e14f55cbdcff40f7ae488cb9ff7bc6f90 (patch)
treeb2e6d6b83f9630e64875776f965818b77aa41f69 /src/tools/dcpomatic.cc
parentfb86361c31c35d7df3dede7b40e4b60e2e7f9c1a (diff)
Better reporting of unknown exceptions in some cases.
Diffstat (limited to 'src/tools/dcpomatic.cc')
-rw-r--r--src/tools/dcpomatic.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 09aebd39c..6b7ad0273 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -798,12 +798,21 @@ class App : public wxApp
return true;
}
+ /* An unhandled exception has occurred inside the main event loop */
bool OnExceptionInMainLoop ()
{
- error_dialog (0, _("An unknown exception occurred. Please report this problem to the DCP-o-matic author (carl@dcpomatic.com)."));
+ try {
+ throw;
+ } catch (exception& e) {
+ error_dialog (0, wxString::Format (_("An exception occurred (%s). Please report this problem to the DCP-o-matic author (carl@dcpomatic.com)."), e.what ()));
+ } catch (...) {
+ error_dialog (0, _("An unknown exception occurred. Please report this problem to the DCP-o-matic author (carl@dcpomatic.com)."));
+ }
+
+ /* This will terminate the program */
return false;
}
-
+
void OnUnhandledException ()
{
error_dialog (0, _("An unknown exception occurred. Please report this problem to the DCP-o-matic author (carl@dcpomatic.com)."));