From 5d330238d5ca7b7a756be4bdaa4a4ba873dd9f7a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 25 Aug 2014 17:47:50 +0000 Subject: [PATCH] Add missing wxUSE_EXCEPTIONS checks. Build fixes after StoreCurrentException and RethrowStoredException() introduction: don't use the latter if exceptions support is turned off. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/evtloopcmn.cpp | 4 ++++ src/gtk/evtloop.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/common/evtloopcmn.cpp b/src/common/evtloopcmn.cpp index e22fccdd64..caecab0e33 100644 --- a/src/common/evtloopcmn.cpp +++ b/src/common/evtloopcmn.cpp @@ -140,6 +140,7 @@ bool wxEventLoopBase::YieldFor(long eventsToProcess) DoYieldFor(eventsToProcess); +#if wxUSE_EXCEPTIONS // If any handlers called from inside DoYieldFor() threw exceptions, they // may have been stored for later rethrow as it's unsafe to let them escape // from inside DoYieldFor() itself, as it calls native functions through @@ -147,6 +148,7 @@ bool wxEventLoopBase::YieldFor(long eventsToProcess) // code, we may rethrow them. if ( wxTheApp ) wxTheApp->RethrowStoredException(); +#endif // wxUSE_EXCEPTIONS return true; } @@ -218,10 +220,12 @@ bool wxEventLoopManual::ProcessEvents() const bool res = Dispatch(); +#if wxUSE_EXCEPTIONS // Rethrow any exceptions which could have been produced by the handlers // ran by Dispatch(). if ( wxTheApp ) wxTheApp->RethrowStoredException(); +#endif // wxUSE_EXCEPTIONS return res; } diff --git a/src/gtk/evtloop.cpp b/src/gtk/evtloop.cpp index 10731b30f9..72fd51baa4 100644 --- a/src/gtk/evtloop.cpp +++ b/src/gtk/evtloop.cpp @@ -78,10 +78,12 @@ int wxGUIEventLoop::DoRun() OnExit(); +#if wxUSE_EXCEPTIONS // Rethrow any exceptions which could have been produced by the handlers // ran by the event loop. if ( wxTheApp ) wxTheApp->RethrowStoredException(); +#endif // wxUSE_EXCEPTIONS return m_exitcode; }