From ad13e1fb45d7233a54511d578c6a7ef509aba651 Mon Sep 17 00:00:00 2001 From: wowzaman12 Date: Sat, 28 Mar 2015 13:56:33 +0000 Subject: [PATCH] Try to be more informative than the default wx exception handler before terminating --- src/wx/wxvbam.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/wx/wxvbam.h b/src/wx/wxvbam.h index df6f9287..dec857ed 100644 --- a/src/wx/wxvbam.h +++ b/src/wx/wxvbam.h @@ -73,6 +73,16 @@ public: wxString log; // there's no way to retrieve "current" locale, so this is public wxLocale locale; + + //Handle most exceptions + virtual bool OnExceptionInMainLoop() + { + try {throw;} + catch(const std::exception& e){ + std::cerr << "AN ERROR HAS OCCURRED: " << e.what() << std::endl; + return false; + } + } private: wxPathList config_path; };