summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ReferenceFactory.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-07-11 14:06:17 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-07-11 14:06:17 +0000
commitbfd7f1aa2e102b933ac5933124f2560428a34452 (patch)
treec89163be2d2e078324984c85e4bce54baf3ffc38 /cpp/src/Ice/ReferenceFactory.cpp
parentfix optimization settings. (diff)
downloadice-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 'cpp/src/Ice/ReferenceFactory.cpp')
-rw-r--r--cpp/src/Ice/ReferenceFactory.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp
index 3519f36b12f..f39a0fb760d 100644
--- a/cpp/src/Ice/ReferenceFactory.cpp
+++ b/cpp/src/Ice/ReferenceFactory.cpp
@@ -16,6 +16,7 @@
#include <Ice/EndpointFactoryManager.h>
#include <Ice/RouterInfo.h>
#include <Ice/LocatorInfo.h>
+#include <Ice/LoggerUtil.h>
#include <Ice/BasicStream.h>
#include <IceUtil/StringUtil.h>
@@ -415,6 +416,7 @@ IceInternal::ReferenceFactory::create(const string& str)
{
case ':':
{
+ vector<string> unknownEndpoints;
end = beg;
while(end < s.length() && s[end] == ':')
@@ -429,8 +431,31 @@ IceInternal::ReferenceFactory::create(const string& str)
string es = s.substr(beg, end - beg);
EndpointPtr endp = _instance->endpointFactoryManager()->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, secure, endpoints, routerInfo, true);
break;
}