summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2009-10-05 13:23:38 -0230
committerDwayne Boone <dwayne@zeroc.com>2009-10-05 13:23:38 -0230
commit3f9eaf0d509a150a48a50c9050ee09db68b93d61 (patch)
tree9ec49e9104c60cba1d30b78063b5169d768530a1 /cpp/src
parentBug 4295 - issue with Glacier2 build (diff)
downloadice-3f9eaf0d509a150a48a50c9050ee09db68b93d61.tar.bz2
ice-3f9eaf0d509a150a48a50c9050ee09db68b93d61.tar.xz
ice-3f9eaf0d509a150a48a50c9050ee09db68b93d61.zip
Make unknown field in UnknownUSerException more consistent
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Incoming.cpp19
-rw-r--r--cpp/src/Ice/LoggerUtil.cpp2
2 files changed, 20 insertions, 1 deletions
diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp
index f26467afe58..6a389699e65 100644
--- a/cpp/src/Ice/Incoming.cpp
+++ b/cpp/src/Ice/Incoming.cpp
@@ -27,6 +27,13 @@ using namespace std;
using namespace Ice;
using namespace IceInternal;
+namespace IceUtilInternal
+{
+
+extern bool ICE_DECLSPEC_IMPORT printStackTraces;
+
+}
+
IceInternal::IncomingBase::IncomingBase(Instance* instance, ConnectionI* connection,
const ObjectAdapterPtr& adapter,
bool response, Byte compress, Int requestId) :
@@ -238,6 +245,12 @@ IceInternal::IncomingBase::__handleException(const std::exception& exc)
_os.write(replyUnknownLocalException);
ostringstream str;
str << *le;
+#ifdef __GNUC__
+ if(IceUtilInternal::printStackTraces)
+ {
+ str << '\n' << ex->ice_stackTrace();
+ }
+#endif
_os.write(str.str(), false);
}
else if(const UserException* ue = dynamic_cast<const UserException*>(&exc))
@@ -245,6 +258,12 @@ IceInternal::IncomingBase::__handleException(const std::exception& exc)
_os.write(replyUnknownUserException);
ostringstream str;
str << *ue;
+#ifdef __GNUC__
+ if(IceUtilInternal::printStackTraces)
+ {
+ str << '\n' << ex->ice_stackTrace();
+ }
+#endif
_os.write(str.str(), false);
}
else
diff --git a/cpp/src/Ice/LoggerUtil.cpp b/cpp/src/Ice/LoggerUtil.cpp
index 2a98d72fa3f..ab35dd124d7 100644
--- a/cpp/src/Ice/LoggerUtil.cpp
+++ b/cpp/src/Ice/LoggerUtil.cpp
@@ -19,7 +19,7 @@ using namespace std;
namespace IceUtilInternal
{
-extern bool printStackTraces;
+extern bool ICE_DECLSPEC_IMPORT printStackTraces;
}