summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-11-10 16:48:01 +0000
committerGordon Sim <gsim@apache.org>2008-11-10 16:48:01 +0000
commit0cfc8d2a7ca9bc32b7ed30ce9ad5a11abaf150f0 (patch)
treebae435d907e7cfaa5965f3b66b0e0333c644631a
parentced8b34442a004fc76a268754d4d23854c7c0af3 (diff)
downloadqpid-python-0cfc8d2a7ca9bc32b7ed30ce9ad5a11abaf150f0.tar.gz
* 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 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@712691 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/tests/perftest.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/qpid/cpp/src/tests/perftest.cpp b/qpid/cpp/src/tests/perftest.cpp
index eb7235a09b..751a5f6288 100644
--- a/qpid/cpp/src/tests/perftest.cpp
+++ b/qpid/cpp/src/tests/perftest.cpp
@@ -226,8 +226,12 @@ struct Client : public Runnable {
}
~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 @@ struct Controller : public Client {
}
catch (const std::exception& e) {
cout << "Controller exception: " << e.what() << endl;
- exit(1);
}
}
};
@@ -522,7 +525,6 @@ struct PublishThread : public Client {
}
catch (const std::exception& e) {
cout << "PublishThread exception: " << e.what() << endl;
- exit(1);
}
}
};
@@ -621,7 +623,6 @@ struct SubscribeThread : public Client {
}
catch (const std::exception& e) {
cout << "SubscribeThread exception: " << e.what() << endl;
- exit(1);
}
}
};