summaryrefslogtreecommitdiff
path: root/rb/src/IceRuby/Proxy.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2012-10-18 14:23:58 -0700
committerMark Spruiell <mes@zeroc.com>2012-10-18 14:23:58 -0700
commit1c2e1376f5d875483a8561b9654935c83b497897 (patch)
tree9554d2698a31eba783ef656dd1cbf66a47ef2c8c /rb/src/IceRuby/Proxy.cpp
parentmakedist fixes (diff)
downloadice-1c2e1376f5d875483a8561b9654935c83b497897.tar.bz2
ice-1c2e1376f5d875483a8561b9654935c83b497897.tar.xz
ice-1c2e1376f5d875483a8561b9654935c83b497897.zip
ICE-4862 - checkedCast raises FacetNotExistException
Diffstat (limited to 'rb/src/IceRuby/Proxy.cpp')
-rw-r--r--rb/src/IceRuby/Proxy.cpp34
1 files changed, 21 insertions, 13 deletions
diff --git a/rb/src/IceRuby/Proxy.cpp b/rb/src/IceRuby/Proxy.cpp
index 96821876a6e..2452cd12506 100644
--- a/rb/src/IceRuby/Proxy.cpp
+++ b/rb/src/IceRuby/Proxy.cpp
@@ -12,6 +12,7 @@
#include <Connection.h>
#include <Endpoint.h>
#include <Util.h>
+#include <Ice/LocalException.h>
#include <Ice/Locator.h>
#include <Ice/Proxy.h>
#include <Ice/Router.h>
@@ -956,27 +957,34 @@ checkedCastImpl(const Ice::ObjectPrx& p, const string& id, VALUE facet, VALUE ct
target = p->ice_facet(getString(facet));
}
- if(NIL_P(ctx))
+ try
{
- if(target->ice_isA(id))
+ if(NIL_P(ctx))
{
- return createProxy(target, type);
+ if(target->ice_isA(id))
+ {
+ return createProxy(target, type);
+ }
}
- }
- else
- {
- Ice::Context c;
+ else
+ {
+ Ice::Context c;
#ifndef NDEBUG
- bool b =
+ bool b =
#endif
- hashToContext(ctx, c);
- assert(b);
+ hashToContext(ctx, c);
+ assert(b);
- if(target->ice_isA(id, c))
- {
- return createProxy(target, type);
+ if(target->ice_isA(id, c))
+ {
+ return createProxy(target, type);
+ }
}
}
+ catch(const Ice::FacetNotExistException&)
+ {
+ // Ignore.
+ }
return Qnil;
}