Merge master.
[dcpomatic.git] / src / tools / dcpomatic.cc
index 8763e35cb2abc2e2000323c2dd06ba62787f0595..3bef7bce300f663be2ca9340f7e8d4f9313d6dab 100644 (file)
@@ -802,12 +802,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)."));