diff options
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index f3547e79bda..d9adeb90dd2 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -15,7 +15,9 @@ #include <Ice/Instance.h> #include <Ice/Communicator.h> #include <Ice/Properties.h> +#include <Ice/Logger.h> #include <Ice/Functional.h> +#include <sstream> using namespace std; using namespace Ice; @@ -244,7 +246,7 @@ IceInternal::ThreadPool::run() return; } - if (FD_ISSET(_fdIntrRead, &fdSet)) // Clear interrupt + if (FD_ISSET(_fdIntrRead, &fdSet)) { clearInterrupt(); #ifdef WIN32 @@ -421,15 +423,19 @@ IceInternal::ThreadPool::EventHandlerThread::run() } catch (const LocalException& ex) { - cerr << ex << endl; + ostringstream s; + s << "exception in thread pool:\n" << ex; + _pool->_instance->logger()->error(s.str()); } catch (const JTCException& ex) { - cerr << ex << endl; + ostringstream s; + s << "exception in thread pool:\n" << ex; + _pool->_instance->logger()->error(s.str()); } catch (...) { - cerr << "unknown exception" << endl; + _pool->_instance->logger()->error("unknown exception in thread pool"); } _pool = 0; // Break cyclic dependency |