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/IceBox/ServiceManagerI.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/IceBox/ServiceManagerI.cpp')
-rw-r--r-- | cpp/src/IceBox/ServiceManagerI.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp index e80a49474e6..c5b59c43b7f 100644 --- a/cpp/src/IceBox/ServiceManagerI.cpp +++ b/cpp/src/IceBox/ServiceManagerI.cpp @@ -190,6 +190,9 @@ IceBox::ServiceManagerI::startService(const string& name, const Current&) Warning out(_logger); out << "ServiceManager: exception in start for service " << info.name << ":\n"; out << ex; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif } catch(...) { @@ -268,6 +271,9 @@ IceBox::ServiceManagerI::stopService(const string& name, const Current&) Warning out(_logger); out << "ServiceManager: exception in stop for service " << info.name << ":\n"; out << ex; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif } catch(...) { @@ -545,6 +551,9 @@ IceBox::ServiceManagerI::start() { Error out(_logger); out << ex.reason; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif stopAll(); return false; } @@ -552,6 +561,9 @@ IceBox::ServiceManagerI::start() { Error out(_logger); out << "ServiceManager: " << ex; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif stopAll(); return false; } @@ -701,6 +713,9 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint, Warning out(_logger); out << "ServiceManager: exception in shutting down communicator for service " << service << ":\n"; out << ex; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif } try @@ -713,6 +728,9 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint, Warning out(_logger); out << "ServiceManager: exception in shutting down communicator for service " << service << ":\n"; out << ex; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif } } throw; @@ -778,6 +796,9 @@ IceBox::ServiceManagerI::stopAll() Warning out(_logger); out << "ServiceManager: exception in stop for service " << info.name << ":\n"; out << ex; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif } catch(...) { @@ -819,6 +840,9 @@ IceBox::ServiceManagerI::stopAll() Warning out(_logger); out << "ServiceManager: exception in stop for service " << info.name << ":\n"; out << ex; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif } } @@ -856,6 +880,9 @@ IceBox::ServiceManagerI::stopAll() Warning out(_logger); out << "ServiceManager: exception in stop for service " << info.name << ":\n"; out << ex; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif } } @@ -868,6 +895,9 @@ IceBox::ServiceManagerI::stopAll() Warning out(_logger); out << "ServiceManager: exception in stop for service " << info.name << ":\n"; out << ex; +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif } catch(...) { @@ -882,6 +912,14 @@ IceBox::ServiceManagerI::stopAll() { _sharedCommunicator->destroy(); } + catch(const Ice::Exception& ex) + { + Warning out(_logger); + out << "ServiceManager: unknown exception while destroying shared communicator:\n" << ex.what(); +#ifdef __GNUC__ + out << "\n" << ex.ice_stackTrace(); +#endif + } catch(const std::exception& ex) { Warning out(_logger); |