diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-05-09 13:07:41 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-05-09 13:07:41 +0000 |
commit | 197b6de9281b52d0b53c4b3fa3312e371b4469a9 (patch) | |
tree | bae93f8155da0770f5dd45d12ef1160ee99aed54 /cpp/src/Ice/Exception.cpp | |
parent | Added identityToString and stringToIdentity to Communicator (diff) | |
download | ice-197b6de9281b52d0b53c4b3fa3312e371b4469a9.tar.bz2 ice-197b6de9281b52d0b53c4b3fa3312e371b4469a9.tar.xz ice-197b6de9281b52d0b53c4b3fa3312e371b4469a9.zip |
Fixed proxy and identity t/from string functions to use string converters
Diffstat (limited to 'cpp/src/Ice/Exception.cpp')
-rw-r--r-- | cpp/src/Ice/Exception.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index d3d1138d4ed..19190a3f413 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -10,8 +10,8 @@ #include <Ice/Exception.h> #include <Ice/LocalException.h> #include <Ice/Network.h> -#include <Ice/IdentityUtil.h> #include <Ice/Plugin.h> +#include <IceUtil/StringUtil.h> #include <iomanip> using namespace std; @@ -149,13 +149,31 @@ void Ice::IllegalIdentityException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nillegal identity: `" << id << "'"; + out << ":\nillegal identity: `"; + if(id.category.empty()) + { + out << IceUtil::escapeString(id.name, "/"); + } + else + { + out << IceUtil::escapeString(id.category, "/") << '/' << IceUtil::escapeString(id.name, "/"); + } + out << "'"; } static void printFailedRequestData(ostream& out, const RequestFailedException& ex) { - out << "\nidentity: " << ex.id; + out << ":\nidentity: `"; + if(ex.id.category.empty()) + { + out << IceUtil::escapeString(ex.id.name, "/"); + } + else + { + out << IceUtil::escapeString(ex.id.category, "/") << '/' << IceUtil::escapeString(ex.id.name, "/"); + } + out << "'"; out << "\nfacet: " << ex.facet; out << "\noperation: " << ex.operation; } |