diff options
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 |