+#if wxUSE_EXCEPTIONS
+ // call the specified handler on the given object with the given event
+ //
+ // this method only exists to allow catching the exceptions thrown by any
+ // event handler, it would lead to an extra (useless) virtual function call
+ // if the exceptions were not used, so it doesn't even exist in that case
+ virtual void HandleEvent(wxEvtHandler *handler,
+ wxEventFunction func,
+ wxEvent& event) const;
+
+ // Called when an unhandled C++ exception occurs inside OnRun(): note that
+ // the exception type is lost by now, so if you really want to handle the
+ // exception you should override OnRun() and put a try/catch around
+ // MainLoop() call there or use OnExceptionInMainLoop()
+ virtual void OnUnhandledException() { }
+#endif // wxUSE_EXCEPTIONS
+
+ // event processing functions
+ // --------------------------
+
+ // return true if we're running event loop, i.e. if the events can
+ // (already) be dispatched
+ static bool IsMainLoopRunning()
+ {
+ const wxAppConsole * const app = GetInstance();
+ return app && app->m_mainLoop != NULL;
+ }
+