Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49969 - in trunk/libs/thread/src: pthread win32
From: anthony_at_[hidden]
Date: 2008-11-27 16:15:38


Author: anthonyw
Date: 2008-11-27 16:15:37 EST (Thu, 27 Nov 2008)
New Revision: 49969
URL: http://svn.boost.org/trac/boost/changeset/49969

Log:
Removed controversial catch(...) clauses from thread class
Text files modified:
   trunk/libs/thread/src/pthread/thread.cpp | 10 ++++++----
   trunk/libs/thread/src/win32/thread.cpp | 10 ++++++----
   2 files changed, 12 insertions(+), 8 deletions(-)

Modified: trunk/libs/thread/src/pthread/thread.cpp
==============================================================================
--- trunk/libs/thread/src/pthread/thread.cpp (original)
+++ trunk/libs/thread/src/pthread/thread.cpp 2008-11-27 16:15:37 EST (Thu, 27 Nov 2008)
@@ -132,10 +132,12 @@
                 catch(thread_interrupted const&)
                 {
                 }
- catch(...)
- {
- std::terminate();
- }
+// Removed as it stops the debugger identifying the cause of the exception
+// Unhandled exceptions still cause the application to terminate
+// catch(...)
+// {
+// std::terminate();
+// }
 
                 detail::tls_destructor(thread_info.get());
                 detail::set_current_thread_data(0);

Modified: trunk/libs/thread/src/win32/thread.cpp
==============================================================================
--- trunk/libs/thread/src/win32/thread.cpp (original)
+++ trunk/libs/thread/src/win32/thread.cpp 2008-11-27 16:15:37 EST (Thu, 27 Nov 2008)
@@ -169,10 +169,12 @@
             catch(thread_interrupted const&)
             {
             }
- catch(...)
- {
- std::terminate();
- }
+// Removed as it stops the debugger identifying the cause of the exception
+// Unhandled exceptions still cause the application to terminate
+// catch(...)
+// {
+// std::terminate();
+// }
             run_thread_exit_callbacks();
             return 0;
         }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk