summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Application.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-01-25 18:42:10 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-01-25 18:42:10 +0100
commit524c89c8c5ea8be6d989c855095cf4c58097e654 (patch)
tree697a384847d23d3d84345b84339f42d63d45687a /cpp/src/Ice/Application.cpp
parentFixed ICE-7281 - skipEmptyEncapsulation now checks for the encoding version (diff)
downloadice-524c89c8c5ea8be6d989c855095cf4c58097e654.tar.bz2
ice-524c89c8c5ea8be6d989c855095cf4c58097e654.tar.xz
ice-524c89c8c5ea8be6d989c855095cf4c58097e654.zip
First cut of ICE-6920 - Remove try/catch block around communicator destroy
Diffstat (limited to 'cpp/src/Ice/Application.cpp')
-rw-r--r--cpp/src/Ice/Application.cpp71
1 files changed, 5 insertions, 66 deletions
diff --git a/cpp/src/Ice/Application.cpp b/cpp/src/Ice/Application.cpp
index 976026dfe45..35adba8549c 100644
--- a/cpp/src/Ice/Application.cpp
+++ b/cpp/src/Ice/Application.cpp
@@ -503,22 +503,7 @@ Ice::Application::doMain(int argc, char* argv[], const InitializationData& initD
if(_communicator != 0)
{
- try
- {
- _communicator->destroy();
- }
- catch(const std::exception& ex)
- {
- Error out(getProcessLogger());
- out << ex;
- status = EXIT_FAILURE;
- }
- catch(...)
- {
- Error out(getProcessLogger());
- out << "unknown exception";
- status = EXIT_FAILURE;
- }
+ _communicator->destroy();
_communicator = 0;
}
@@ -580,31 +565,8 @@ Ice::Application::destroyOnInterruptCallback(int signal)
_destroyed = true;
}
- try
- {
- assert(_communicator != 0);
- _communicator->destroy();
- }
- catch(const std::exception& ex)
- {
- Error out(getProcessLogger());
- out << "(while destroying in response to signal " << signal << "): " << ex;
- }
- catch(const std::string& msg)
- {
- Error out(getProcessLogger());
- out << "(while destroying in response to signal " << signal << "): " << msg;
- }
- catch(const char* msg)
- {
- Error out(getProcessLogger());
- out << "(while destroying in response to signal " << signal << "): " << msg;
- }
- catch(...)
- {
- Error out(getProcessLogger());
- out << "(while destroying in response to signal " << signal << "): unknown exception";
- }
+ assert(_communicator != 0);
+ _communicator->destroy();
{
Mutex::Lock lock(_mutex);
@@ -635,31 +597,8 @@ Ice::Application::shutdownOnInterruptCallback(int signal)
_interrupted = true;
}
- try
- {
- assert(_communicator != 0);
- _communicator->shutdown();
- }
- catch(const std::exception& ex)
- {
- Error out(getProcessLogger());
- out << "(while shutting down in response to signal " << signal << "): std::exception: " << ex;
- }
- catch(const std::string& msg)
- {
- Error out(getProcessLogger());
- out << "(while shutting down in response to signal " << signal << "): " << msg;
- }
- catch(const char* msg)
- {
- Error out(getProcessLogger());
- out << "(while shutting down in response to signal " << signal << "): " << msg;
- }
- catch(...)
- {
- Error out(getProcessLogger());
- out << "(while shutting down in response to signal " << signal << "): unknown exception";
- }
+ assert(_communicator != 0);
+ _communicator->shutdown();
{
Mutex::Lock lock(_mutex);