summaryrefslogtreecommitdiff
path: root/cpp/src/Glacier2Lib/SessionHelper.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2012-10-22 12:56:41 -0400
committerBernard Normier <bernard@zeroc.com>2012-10-22 12:56:41 -0400
commitf1b727794617cc064d3aabee1e981cd4dcd07051 (patch)
treed4c18e607ad7059de11c06dd096dd28ee1f508f6 /cpp/src/Glacier2Lib/SessionHelper.cpp
parentMerge branch 'master' of ssh://git/home/git/ice (diff)
downloadice-f1b727794617cc064d3aabee1e981cd4dcd07051.tar.bz2
ice-f1b727794617cc064d3aabee1e981cd4dcd07051.tar.xz
ice-f1b727794617cc064d3aabee1e981cd4dcd07051.zip
Fixed ICE-4882:
Better logging in C++, especially with services. On compilers with stack-trace printing support, the stack trace of most exceptions is now logged.
Diffstat (limited to 'cpp/src/Glacier2Lib/SessionHelper.cpp')
-rw-r--r--cpp/src/Glacier2Lib/SessionHelper.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/cpp/src/Glacier2Lib/SessionHelper.cpp b/cpp/src/Glacier2Lib/SessionHelper.cpp
index 3080fe5c47f..a97e6706cd1 100644
--- a/cpp/src/Glacier2Lib/SessionHelper.cpp
+++ b/cpp/src/Glacier2Lib/SessionHelper.cpp
@@ -438,17 +438,15 @@ SessionHelperI::destroyInternal(const Ice::DispatcherCallPtr& disconnected)
// This can also occur.
//
}
- catch(const Ice::Exception& ex)
+ catch(const std::exception& ex)
{
//
// Not expected.
//
- ostringstream os;
- os << "SessionHelper: unexpected exception when destroying the session:\n";
- os << ex;
if(communicator)
{
- communicator->getLogger()->warning(os.str());
+ Ice::Warning warn(communicator->getLogger());
+ warn << "SessionHelper: unexpected exception when destroying the session:\n" << ex;
}
}
}