diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-10-05 13:23:38 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-10-05 13:23:38 -0230 |
commit | 3f9eaf0d509a150a48a50c9050ee09db68b93d61 (patch) | |
tree | 9ec49e9104c60cba1d30b78063b5169d768530a1 /cpp/src/Ice/Incoming.cpp | |
parent | Bug 4295 - issue with Glacier2 build (diff) | |
download | ice-3f9eaf0d509a150a48a50c9050ee09db68b93d61.tar.bz2 ice-3f9eaf0d509a150a48a50c9050ee09db68b93d61.tar.xz ice-3f9eaf0d509a150a48a50c9050ee09db68b93d61.zip |
Make unknown field in UnknownUSerException more consistent
Diffstat (limited to 'cpp/src/Ice/Incoming.cpp')
-rw-r--r-- | cpp/src/Ice/Incoming.cpp | 19 |
1 files changed, 19 insertions, 0 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 |