diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-05-07 09:44:25 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-05-07 09:44:25 -0230 |
commit | 2d0d9ef78501a0d3c9b6ab77bd31afa845db7cd3 (patch) | |
tree | da8bb8159c737559c48989869a23e280e7cb38bd /cpp/src/Ice/ThreadPool.cpp | |
parent | Bug 3624 - desupport HP (diff) | |
download | ice-2d0d9ef78501a0d3c9b6ab77bd31afa845db7cd3.tar.bz2 ice-2d0d9ef78501a0d3c9b6ab77bd31afa845db7cd3.tar.xz ice-2d0d9ef78501a0d3c9b6ab77bd31afa845db7cd3.zip |
Bug 2664 - show stack traces with C++
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 27 |
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); |