Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2007-11-22 04:59:38


Author: johnmaddock
Date: 2007-11-22 04:59:38 EST (Thu, 22 Nov 2007)
New Revision: 41301
URL: http://svn.boost.org/trac/boost/changeset/41301

Log:
Added try...catch around TSS initialisation.
Text files modified:
   trunk/libs/regex/test/regress/main.cpp | 9 ++++++++-
   1 files changed, 8 insertions(+), 1 deletions(-)

Modified: trunk/libs/regex/test/regress/main.cpp
==============================================================================
--- trunk/libs/regex/test/regress/main.cpp (original)
+++ trunk/libs/regex/test/regress/main.cpp 2007-11-22 04:59:38 EST (Thu, 22 Nov 2007)
@@ -70,7 +70,14 @@
 int cpp_main(int /*argc*/, char * /*argv*/[])
 {
 #ifdef TEST_THREADS
- get_array_data(); // initialises data.
+ try{
+ get_array_data(); // initialises data.
+ }
+ catch(const std::exception& e)
+ {
+ std::cerr << "TSS Initialisation failed with message: " << e.what() << std::endl;
+ return -1;
+ }
 
    std::list<boost::shared_ptr<boost::thread> > threads;
    for(int i = 0; i < 5; ++i)


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