From: jfarrell Date: Tue, 23 Apr 2013 20:42:04 +0000 (-0500) Subject: Thrift-1942: Binary accelerated cpp extension does not use Thrift namespaces for... X-Git-Tag: 0.9.1~142 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=6bdb10b592853fa036ff656032adb03d4b1a3ef4;p=common%2Fthrift.git Thrift-1942: Binary accelerated cpp extension does not use Thrift namespaces for Exceptions Client: php Patch: Tyler Hobbs Adds namespaced TException to the accelerated php client lib. --- diff --git a/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp b/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp index 0d741c2e..551d438d 100644 --- a/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp +++ b/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp @@ -423,7 +423,7 @@ void throw_tprotocolexception(char* what, long errorcode) { zval* ex; MAKE_STD_ZVAL(ex); - createObject("TProtocolException", ex, 2, zwhat, zerrorcode); + createObject("\\Thrift\\Exception\\TProtocolException", ex, 2, zwhat, zerrorcode); zval_ptr_dtor(&zwhat); zval_ptr_dtor(&zerrorcode); throw PHPExceptionWrapper(ex); @@ -1101,7 +1101,7 @@ PHP_FUNCTION(thrift_protocol_read_binary) { if (messageType == T_EXCEPTION) { zval* ex; MAKE_STD_ZVAL(ex); - createObject("TApplicationException", ex); + createObject("\\Thrift\\Exception\\TApplicationException", ex); zval* spec = zend_read_static_property(zend_get_class_entry(ex TSRMLS_CC), "_TSPEC", 6, false TSRMLS_CC); binary_deserialize_spec(ex, transport, Z_ARRVAL_P(spec)); throw PHPExceptionWrapper(ex);