summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2004-02-12 09:50:08 +0000
committerAndi Gutmans <andi@php.net>2004-02-12 09:50:08 +0000
commit559b14611df00e3b73600a51eb6233c181cca325 (patch)
tree84ad85f9a1223333fe0c1be9e68c542bb059d6bd /Zend/zend_execute_API.c
parent71380e7d7fbed263e865a33489b02c707447af6e (diff)
downloadphp-git-559b14611df00e3b73600a51eb6233c181cca325.tar.gz
- Add API function to throw exception by using an object
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 02d8e8bae7..ee1d88ca68 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -1221,6 +1221,15 @@ void zend_throw_exception_internal(zval *exception TSRMLS_DC)
EG(current_execute_data)->opline = &EG(active_op_array)->opcodes[EG(active_op_array)->last-1-1];
}
+ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC)
+{
+ if (exception == NULL) {
+ zend_error(E_ERROR, "Need to supply object when throwing exception");
+ }
+ zend_throw_exception_internal(exception TSRMLS_CC);
+}
+
+
ZEND_API void zend_clear_exception(TSRMLS_D)
{