Author: gsim
Date: Mon Nov 10 08:48:01 2008
New Revision: 712691

URL: http://svn.apache.org/viewvc?rev=712691&view=rev
Log:
* don't call exit after catching exception on any particular thread as the 
other threads may still be running and this causes core dumps
* catch any errors that occur in shutdown


Modified:
    incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp?rev=712691&r1=712690&r2=712691&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp Mon Nov 10 08:48:01 
2008
@@ -226,8 +226,12 @@
     }
 
     ~Client() {
-        session.close();
-        connection.close();
+        try {
+            session.close();
+            connection.close();
+        } catch (const std::exception& e) {
+            std::cerr << "Error in shutdown: " << e.what() << std::endl;
+        }
     }
 };
 
@@ -429,7 +433,6 @@
         }
         catch (const std::exception& e) {
             cout << "Controller exception: " << e.what() << endl;
-            exit(1);
         }
     }
 };
@@ -522,7 +525,6 @@
         }
         catch (const std::exception& e) {
             cout << "PublishThread exception: " << e.what() << endl;
-            exit(1);
         }
     }
 };
@@ -621,7 +623,6 @@
         }
         catch (const std::exception& e) {
             cout << "SubscribeThread exception: " << e.what() << endl;
-            exit(1);
         }
     }
 };


Reply via email to