You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2008/07/25 23:05:59 UTC

svn commit: r679897 - /incubator/thrift/trunk/lib/rb/ext/binaryprotocolaccelerated.c

Author: dreiss
Date: Fri Jul 25 14:05:59 2008
New Revision: 679897

URL: http://svn.apache.org/viewvc?rev=679897&view=rev
Log:
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().

Modified:
    incubator/thrift/trunk/lib/rb/ext/binaryprotocolaccelerated.c

Modified: incubator/thrift/trunk/lib/rb/ext/binaryprotocolaccelerated.c
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/ext/binaryprotocolaccelerated.c?rev=679897&r1=679896&r2=679897&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/ext/binaryprotocolaccelerated.c (original)
+++ incubator/thrift/trunk/lib/rb/ext/binaryprotocolaccelerated.c Fri Jul 25 14:05:59 2008
@@ -1181,9 +1181,9 @@
   }
   
   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;