Don't show dialogs from OnExceptionInMainLoop() in the tests

Similarly to the previous commit, ensure that the tests can run
unattended under MSW even if an unhandled exception is thrown during
their execution.
This commit is contained in:
Vadim Zeitlin
2018-01-13 18:08:07 +01:00
parent 277937b0c4
commit 9df5541c53

View File

@@ -219,6 +219,16 @@ public:
} }
#endif // __WIN32__ #endif // __WIN32__
// Also override this method to avoid showing any dialogs from here -- and
// show some details about the exception along the way.
virtual bool OnExceptionInMainLoop()
{
wxFprintf(stderr, "Unhandled exception in the main loop: %s\n",
Catch::translateActiveException());
throw;
}
// used by events propagation test // used by events propagation test
virtual int FilterEvent(wxEvent& event); virtual int FilterEvent(wxEvent& event);
virtual bool ProcessEvent(wxEvent& event); virtual bool ProcessEvent(wxEvent& event);