From 3899248d29369196473df36697f834d772faff74 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Fri, 25 Jul 2008 21:05:59 +0000 Subject: [PATCH] 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 --- lib/rb/ext/binaryprotocolaccelerated.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.17.1