From 92c74c3513e291caa5532da3bdfd9c103664bdbe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 8 Feb 2014 00:43:00 +0000 Subject: [PATCH] Don't use try/catch if exceptions support is disabled. Closes #15954. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/threadpsx.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 4efe5d56f1..643acef269 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -870,6 +870,7 @@ void *wxThreadInternal::PthreadStart(wxThread *thread) wxT("Thread %p Entry() returned %lu."), THR_ID(pthread), wxPtrToUInt(pthread->m_exitcode)); } +#ifndef wxNO_EXCEPTIONS #ifdef HAVE_ABI_FORCEDUNWIND // When using common C++ ABI under Linux we must always rethrow this // special exception used to unwind the stack when the thread was @@ -882,7 +883,11 @@ void *wxThreadInternal::PthreadStart(wxThread *thread) throw; } #endif // HAVE_ABI_FORCEDUNWIND - wxCATCH_ALL( wxTheApp->OnUnhandledException(); ) + catch ( ... ) + { + wxTheApp->OnUnhandledException(); + } +#endif // !wxNO_EXCEPTIONS { wxCriticalSectionLocker lock(thread->m_critsect);