diff options
author | Benoit Foucher <benoit@zeroc.com> | 2018-03-20 21:18:10 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2018-03-20 21:18:25 +0100 |
commit | a157ae70831fd23d0c27f118d108d7f13bce3b45 (patch) | |
tree | ae65d3dbfff9ef416e94e49a22d1a826d95a9e0c /ruby/src/IceRuby/Connection.cpp | |
parent | Run JavaScript es6 test suite with Edge (diff) | |
download | ice-a157ae70831fd23d0c27f118d108d7f13bce3b45.tar.bz2 ice-a157ae70831fd23d0c27f118d108d7f13bce3b45.tar.xz ice-a157ae70831fd23d0c27f118d108d7f13bce3b45.zip |
Added sanity checks for ACM timeout value (ICE-8749)
Diffstat (limited to 'ruby/src/IceRuby/Connection.cpp')
-rw-r--r-- | ruby/src/IceRuby/Connection.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ruby/src/IceRuby/Connection.cpp b/ruby/src/IceRuby/Connection.cpp index 1f5c627c1dc..3d1398e8778 100644 --- a/ruby/src/IceRuby/Connection.cpp +++ b/ruby/src/IceRuby/Connection.cpp @@ -151,7 +151,14 @@ IceRuby_Connection_setACM(VALUE self, VALUE t, VALUE c, VALUE h) heartbeat = static_cast<Ice::ACMHeartbeat>(FIX2LONG(heartbeatValue)); } - (*p)->setACM(timeout, close, heartbeat); + try + { + (*p)->setACM(timeout, close, heartbeat); + } + catch(const IceUtil::IllegalArgumentException& ex) + { + throw RubyException(rb_eArgError, ex.reason().c_str()); + } } ICE_RUBY_CATCH return Qnil; |