From 89e6cee8f5f6fb90e0e36aea7a7a21a2be4f331d Mon Sep 17 00:00:00 2001 From: Arthur Moore Date: Mon, 12 Jan 2015 02:32:12 -0500 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 dbfa948c..355fbaf6 100644 --- a/src/wx/wxvbam.h +++ b/src/wx/wxvbam.h @@ -74,6 +74,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; };