use only zend_throw_exception, not SWIG exception wrappers

This commit is contained in:
Meredith L. Patterson 2013-12-21 15:27:57 +01:00
parent 8286ce087d
commit 80eed33825

View file

@ -42,18 +42,18 @@
for (i=0; i<size; i++) {
zval **data;
if (zend_hash_index_find(arr, i, (void**)&data) == FAILURE) {
SWIG_exception(SWIG_IndexError, "index in parser array out of bounds");
$1 = NULL;
zend_throw_exception(zend_exception_get_default(), "index in parser array out of bounds", 0 TSRMLS_CC);
} else {
res = SWIG_ConvertPtr(*data, &($1[i]), SWIGTYPE_p_HParser_, 0 | 0);
if (!SWIG_IsOK(res)) {
SWIG_exception(SWIG_TypeError, "that wasn't an HParser");
zend_throw_exception(zend_exception_get_default(), "that wasn't an HParser", 0 TSRMLS_CC);
}
}
}
} else {
SWIG_exception(SWIG_TypeError, "that wasn't an array of HParsers");
$1 = NULL;
zend_throw_exception(zend_exception_get_default(), "that wasn't an array of HParsers", 0 TSRMLS_CC);
}
}
@ -157,7 +157,7 @@
int res = 0;
res = SWIG_ConvertPtr(return_value, (void*)token, SWIGTYPE_p_HParsedToken_, 0 | 0);
if (!SWIG_IsOK(res)) {
SWIG_exception(SWIG_TypeError, "hpt_to_php: that wasn't an HParsedToken");
zend_throw_exception(zend_exception_get_default(), "hpt_to_php: that wasn't an HParsedToken", 0 TSRMLS_CC);
}
// TODO: support registry
}