cvs: ZendEngine2 / zend_execute.h zend_execute_API.c
| From: | Andi Gutmans | Date: | Thu, 12 Feb 2004 09:50:08 +0000 |
| Subject: | cvs: ZendEngine2 / zend_execute.h zend_execute_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2363@lists.php.net to get a copy of this message | ||
andi Thu Feb 12 04:50:08 2004 EDT
Modified files:
/ZendEngine2 zend_execute.h zend_execute_API.c
Log:
- Add API function to throw exception by using an object
http://cvs.php.net/diff.php/ZendEngine2/zend_execute.h?r1=1.65&r2=1.66&ty=u
Index: ZendEngine2/zend_execute.h
diff -u ZendEngine2/zend_execute.h:1.65 ZendEngine2/zend_execute.h:1.66
--- ZendEngine2/zend_execute.h:1.65 Wed Feb 4 11:30:15 2004
+++ ZendEngine2/zend_execute.h Thu Feb 12 04:50:08 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.h,v 1.65 2004/02/04 16:30:15 zeev Exp $ */
+/* $Id: zend_execute.h,v 1.66 2004/02/12 09:50:08 andi Exp $ */
#ifndef ZEND_EXECUTE_H
#define ZEND_EXECUTE_H
@@ -65,6 +65,8 @@
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC);
ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int
handle_exceptions TSRMLS_DC);
+ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC);
+
static inline int i_zend_is_true(zval *op)
{
int result;
http://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.267&r2=1.268&ty=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.267 ZendEngine2/zend_execute_API.c:1.268
--- ZendEngine2/zend_execute_API.c:1.267 Wed Feb 11 08:01:39 2004
+++ ZendEngine2/zend_execute_API.c Thu Feb 12 04:50:08 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute_API.c,v 1.267 2004/02/11 13:01:39 zeev Exp $ */
+/* $Id: zend_execute_API.c,v 1.268 2004/02/12 09:50:08 andi Exp $ */
#include <stdio.h>
#include <signal.h>
@@ -1221,6 +1221,15 @@
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)
{