diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-07-11 14:06:17 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-07-11 14:06:17 +0000 |
commit | bfd7f1aa2e102b933ac5933124f2560428a34452 (patch) | |
tree | c89163be2d2e078324984c85e4bce54baf3ffc38 /cppe/src/IceE/ReferenceFactory.cpp | |
parent | fix optimization settings. (diff) | |
download | ice-bfd7f1aa2e102b933ac5933124f2560428a34452.tar.bz2 ice-bfd7f1aa2e102b933ac5933124f2560428a34452.tar.xz ice-bfd7f1aa2e102b933ac5933124f2560428a34452.zip |
Parsing a stringified proxy no longer fails if a endpoint type is unknown
as long as there are others that are known.
Diffstat (limited to 'cppe/src/IceE/ReferenceFactory.cpp')
-rw-r--r-- | cppe/src/IceE/ReferenceFactory.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/cppe/src/IceE/ReferenceFactory.cpp b/cppe/src/IceE/ReferenceFactory.cpp index f8e700d6f27..7a4def68b71 100644 --- a/cppe/src/IceE/ReferenceFactory.cpp +++ b/cppe/src/IceE/ReferenceFactory.cpp @@ -20,6 +20,7 @@ #endif #include <IceE/BasicStream.h> #include <IceE/StringUtil.h> +#include <IceE/LoggerUtil.h> using namespace std; using namespace Ice; @@ -409,6 +410,7 @@ IceInternal::ReferenceFactory::create(const string& str) { case ':': { + vector<string> unknownEndpoints; end = beg; while(end < s.length() && s[end] == ':') @@ -423,8 +425,31 @@ IceInternal::ReferenceFactory::create(const string& str) string es = s.substr(beg, end - beg); EndpointPtr endp = _instance->endpointFactory()->create(es); - endpoints.push_back(endp); + if(endp != 0) + { + endpoints.push_back(endp); + } + else + { + unknownEndpoints.push_back(es); + } + } + if(endpoints.size() == 0) + { + EndpointParseException ex(__FILE__, __LINE__); + ex.str = unknownEndpoints.front(); + throw ex; } + else + { + Warning out(_instance->logger()); + out << "Proxy contains unknown endpoints:"; + for(unsigned int idx = 0; idx < unknownEndpoints.size(); ++idx) + { + out << " `" << unknownEndpoints[idx] << "'"; + } + } + return create(ident, Context(), facet, mode, endpoints #ifdef ICEE_HAS_ROUTER , routerInfo |