diff options
author | Marc Laukien <marc@zeroc.com> | 2002-09-27 15:31:04 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-09-27 15:31:04 +0000 |
commit | 6f9d449ef67cb3d5c3a1778d7c20d0338e2635b6 (patch) | |
tree | 9dba8b5850cbf61c8330c3d405b411a1ee5bda18 /cpp/src/Ice/Exception.cpp | |
parent | added AbortException to IcePatch.ice with support in IcePatch/ClientUtil (diff) | |
download | ice-6f9d449ef67cb3d5c3a1778d7c20d0338e2635b6.tar.bz2 ice-6f9d449ef67cb3d5c3a1778d7c20d0338e2635b6.tar.xz ice-6f9d449ef67cb3d5c3a1778d7c20d0338e2635b6.zip |
added RequestFailedException
Diffstat (limited to 'cpp/src/Ice/Exception.cpp')
-rw-r--r-- | cpp/src/Ice/Exception.cpp | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index 7d818ddee6f..fe16488409e 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -116,38 +116,56 @@ Ice::LocationForwardIdentityException::ice_print(ostream& out) const out << ":\nidentity mismatch in location forward"; } -void -Ice::ObjectNotExistException::ice_print(ostream& out) const +static void +printFailedRequestData(ostream& out, const RequestFailedException& ex) { - Exception::ice_print(out); - out << ":\nobject `" << identityToString(id) << "' does not exist"; -} - -void -Ice::FacetNotExistException::ice_print(ostream& out) const -{ - Exception::ice_print(out); - out << ":\nfacet `"; - vector<string>::const_iterator p = facet.begin(); - while(p != facet.end()) + out << "\nidentity: " << identityToString(ex.id); + out << "\nfacet: "; + vector<string>::const_iterator p = ex.facet.begin(); + while(p != ex.facet.end()) { // // TODO: Escape for whitespace and slashes. // out << *p++; - if(p != facet.end()) + if(p != ex.facet.end()) { out << '/'; } } - out << "' does not exist"; + out << "\noperation: " << ex.operation; +} + +void +Ice::RequestFailedException::ice_print(ostream& out) const +{ + Exception::ice_print(out); + out << ":\nrequest failed"; + printFailedRequestData(out, *this); +} + +void +Ice::ObjectNotExistException::ice_print(ostream& out) const +{ + Exception::ice_print(out); + out << ":\nobject does not exist"; + printFailedRequestData(out, *this); +} + +void +Ice::FacetNotExistException::ice_print(ostream& out) const +{ + Exception::ice_print(out); + out << ":\nfacet does not exist"; + printFailedRequestData(out, *this); } void Ice::OperationNotExistException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\noperation `" << operation << "' does not exist"; + out << ":\noperation does not exist"; + printFailedRequestData(out, *this); } void |