diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-08-21 16:17:16 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-08-21 16:17:16 -0230 |
commit | 33dc83b94215d845ba75b2cd299aa3b64f06fdfc (patch) | |
tree | 9b65727c9b89b84ee722b37308de819024bd88d1 /cpp/src/Ice/Instance.cpp | |
parent | removing references to IceInternal.SelectorHandler from proguard configs (diff) | |
download | ice-33dc83b94215d845ba75b2cd299aa3b64f06fdfc.tar.bz2 ice-33dc83b94215d845ba75b2cd299aa3b64f06fdfc.tar.xz ice-33dc83b94215d845ba75b2cd299aa3b64f06fdfc.zip |
Bug 2664 - Added Ice.PrintStackTraces and cleaned up ifdefs
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 1f9e3fe3858..3bd69893744 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -64,6 +64,13 @@ extern bool ICE_DECLSPEC_IMPORT nullHandleAbort; } +namespace IceInternal +{ + +extern bool printStackTraces; + +}; + namespace { @@ -824,6 +831,15 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi { IceUtil::nullHandleAbort = true; } + +#ifdef NDEBUG + if(_initData.properties->getPropertyAsIntWithDefault("Ice.PrintStackTraces", 0) > 0) +#else + if(_initData.properties->getPropertyAsIntWithDefault("Ice.PrintStackTraces", 1) > 0) +#endif + { + printStackTraces = true; + } #ifndef _WIN32 string newUser = _initData.properties->getProperty("Ice.ChangeUser"); @@ -1005,9 +1021,6 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi { Error out(_initData.logger); out << "cannot create thread for timer:\n" << ex; -#ifdef __GNUC__ - out << "\n" << ex.ice_stackTrace(); -#endif throw; } @@ -1019,9 +1032,6 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi { Error out(_initData.logger); out << "cannot create thread for endpoint host resolver:\n" << ex; -#ifdef __GNUC__ - out << "\n" << ex.ice_stackTrace(); -#endif throw; } |