From c33492b10e81720a638c8c7e423a5c4ef4ba7dc4 Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 26 Mar 2014 19:44:41 +0100 Subject: Fixed (ICE-5505) - Outgoing ice_stackTrace only for __GNUC__ --- cpp/src/Ice/Outgoing.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'cpp/src/Ice/Outgoing.cpp') diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index 075ae740caa..5601a705641 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -24,6 +24,13 @@ using namespace Ice; using namespace Ice::Instrumentation; using namespace IceInternal; +namespace IceUtilInternal +{ + +extern bool ICE_DECLSPEC_IMPORT printStackTraces; + +} + IceInternal::LocalExceptionWrapper::LocalExceptionWrapper(const LocalException& ex, bool r) : _retry(r) { @@ -60,9 +67,10 @@ IceInternal::LocalExceptionWrapper::throwWrapper(const std::exception& ex) } stringstream s; s << *le; -#ifdef __GNUC__ - s << "\n" << le->ice_stackTrace(); -#endif + if(IceUtilInternal::printStackTraces) + { + s << "\n" << le->ice_stackTrace(); + } throw LocalExceptionWrapper(UnknownLocalException(__FILE__, __LINE__, s.str()), false); } string msg = "std::exception: "; -- cgit v1.2.3