summaryrefslogtreecommitdiff
path: root/ruby/src/IceRuby/Util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/src/IceRuby/Util.cpp')
-rw-r--r--ruby/src/IceRuby/Util.cpp43
1 files changed, 39 insertions, 4 deletions
diff --git a/ruby/src/IceRuby/Util.cpp b/ruby/src/IceRuby/Util.cpp
index dc151808771..88e3396fcfc 100644
--- a/ruby/src/IceRuby/Util.cpp
+++ b/ruby/src/IceRuby/Util.cpp
@@ -386,6 +386,21 @@ IceRuby::stringSeqToArray(const vector<string>& seq)
return result;
}
+VALUE
+IceRuby::createNumSeq(const vector<Ice::Byte>& v)
+{
+ volatile VALUE result = createArray(v.size());
+ long i = 0;
+ if(v.size() > 0)
+ {
+ for(vector<Ice::Byte>::const_iterator p = v.begin(); p != v.end(); ++p, ++i)
+ {
+ RARRAY_ASET(result, i, INT2FIX(*p));
+ }
+ }
+ return result;
+}
+
namespace
{
@@ -625,6 +640,16 @@ setExceptionMembers(const Ice::LocalException& ex, VALUE p)
volatile VALUE v = createString(e.str);
callRuby(rb_iv_set, p, "@str", v);
}
+ catch(const Ice::EndpointSelectionTypeParseException& e)
+ {
+ volatile VALUE v = createString(e.str);
+ callRuby(rb_iv_set, p, "@str", v);
+ }
+ catch(const Ice::VersionParseException& e)
+ {
+ volatile VALUE v = createString(e.str);
+ callRuby(rb_iv_set, p, "@str", v);
+ }
catch(const Ice::IdentityParseException& e)
{
volatile VALUE v = createString(e.str);
@@ -640,6 +665,11 @@ setExceptionMembers(const Ice::LocalException& ex, VALUE p)
volatile VALUE v = IceRuby::createIdentity(e.id);
callRuby(rb_iv_set, p, "@id", v);
}
+ catch(const Ice::IllegalServantException& e)
+ {
+ volatile VALUE v = createString(e.reason);
+ callRuby(rb_iv_set, p, "@reason", v);
+ }
catch(const Ice::RequestFailedException& e)
{
volatile VALUE v;
@@ -670,6 +700,11 @@ setExceptionMembers(const Ice::LocalException& ex, VALUE p)
v = createString(e.host);
callRuby(rb_iv_set, p, "@host", v);
}
+ catch(const Ice::BadMagicException& e)
+ {
+ volatile VALUE v = createNumSeq(e.badMagic);
+ callRuby(rb_iv_set, p, "@badMagic", v);
+ }
catch(const Ice::UnsupportedProtocolException& e)
{
VALUE m;
@@ -709,6 +744,10 @@ setExceptionMembers(const Ice::LocalException& ex, VALUE p)
volatile VALUE v = createString(e.reason);
callRuby(rb_iv_set, p, "@reason", v);
}
+ catch(const Ice::ConnectionManuallyClosedException& e)
+ {
+ callRuby(rb_iv_set, p, "@graceful", e.graceful ? Qtrue : Qfalse);
+ }
catch(const Ice::FeatureNotSupportedException& e)
{
volatile VALUE v = createString(e.unsupportedFeature);
@@ -719,10 +758,6 @@ setExceptionMembers(const Ice::LocalException& ex, VALUE p)
volatile VALUE v = createString(e.reason);
callRuby(rb_iv_set, p, "@reason", v);
}
- catch(const Ice::ConnectionManuallyClosedException& e)
- {
- callRuby(rb_iv_set, p, "@graceful", e.graceful ? Qtrue : Qfalse);
- }
catch(const Ice::LocalException&)
{
//