From: David Reiss Date: Fri, 25 Jul 2008 21:05:59 +0000 (+0000) Subject: rb: BinaryProtocolAccelerated should use Thrift::ProtocolException [THRIFT-89] X-Git-Tag: 0.2.0~457 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=3899248d29369196473df36697f834d772faff74;p=common%2Fthrift.git rb: BinaryProtocolAccelerated should use Thrift::ProtocolException [THRIFT-89] BinaryProtocolAccelerated references the deprecated name TProtocolException, when it should be using Thrift::ProtocolException. It also uses rb_raise() instead of rb_exc_raise(). git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679897 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/ext/binaryprotocolaccelerated.c b/lib/rb/ext/binaryprotocolaccelerated.c index 2725bfcb..31e969e4 100644 --- a/lib/rb/ext/binaryprotocolaccelerated.c +++ b/lib/rb/ext/binaryprotocolaccelerated.c @@ -1181,9 +1181,9 @@ static VALUE tbpa_read_message_begin(VALUE self) { } if ((version & VERSION_MASK) != VERSION_1) { - VALUE tprotocol_exception = rb_const_get(rb_cObject, rb_intern("TProtocolException")); + VALUE tprotocol_exception = rb_const_get(m_thrift, rb_intern("ProtocolException")); VALUE exception = rb_funcall(tprotocol_exception, rb_intern("new"), 2, rb_const_get(tprotocol_exception, rb_intern("BAD_VERSION")), rb_str_new2("Missing version identifier")); - rb_raise(exception, ""); + rb_exc_raise(exception); } type = version & 0x000000ff;