summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r--cpp/src/Ice/ThreadPool.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 70bc4513bd4..834cbb27695 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -113,6 +113,9 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
{
Error out(_instance->initializationData().logger);
out << "cannot create thread for `" << _prefix << "':\n" << ex;
+#ifdef __GNUC__
+ out << "\n" << ex.ice_stackTrace();
+#endif
}
destroy();
@@ -271,6 +274,9 @@ IceInternal::ThreadPool::promoteFollower(EventHandler* handler)
{
Error out(_instance->initializationData().logger);
out << "cannot create thread for `" << _prefix << "':\n" << ex;
+#ifdef __GNUC__
+ out << "\n" << ex.ice_stackTrace();
+#endif
}
}
}
@@ -327,6 +333,9 @@ IceInternal::ThreadPool::run()
{
Error out(_instance->initializationData().logger);
out << "exception in `" << _prefix << "':\n" << ex;
+#ifdef __GNUC__
+ out << "\n" << ex.ice_stackTrace();
+#endif
continue;
}
@@ -437,6 +446,9 @@ IceInternal::ThreadPool::run()
{
Error out(_instance->initializationData().logger);
out << "exception in `" << _prefix << "' while calling execute():\n" << ex;
+#ifdef __GNUC__
+ out << "\n" << ex.ice_stackTrace();
+#endif
}
//
@@ -467,6 +479,9 @@ IceInternal::ThreadPool::run()
Error out(_instance->initializationData().logger);
out << "exception in `" << _prefix << "' while calling finished():\n"
<< ex << '\n' << handler->toString();
+#ifdef __GNUC__
+ out << "\n" << ex.ice_stackTrace();
+#endif
}
//
@@ -545,6 +560,9 @@ IceInternal::ThreadPool::run()
Error out(_instance->initializationData().logger);
out << "exception in `" << _prefix << "' while calling message():\n"
<< ex << '\n' << handler->toString();
+#ifdef __GNUC__
+ out << "\n" << ex.ice_stackTrace();
+#endif
}
//
@@ -807,6 +825,15 @@ IceInternal::ThreadPool::EventHandlerThread::run()
{
promote = _pool->run();
}
+ catch(const Ice::Exception& ex)
+ {
+ Error out(_pool->_instance->initializationData().logger);
+ out << "exception in `" << _pool->_prefix << "':\n" << ex.what();
+#ifdef __GNUC__
+ out << "\n" << ex.ice_stackTrace();
+#endif
+ promote = true;
+ }
catch(const std::exception& ex)
{
Error out(_pool->_instance->initializationData().logger);