zend_compile_file = compile_file;
zend_execute = execute;
zend_execute_internal = NULL;
+ zend_throw_exception_hook = NULL;
zend_init_opcodes_handlers();
zend_class_entry *default_exception_ce;
static zend_object_handlers default_exception_handlers;
ZEND_API void zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC);
+ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);
void zend_throw_exception_internal(zval *exception TSRMLS_DC)
zend_error(E_ERROR, "Exception thrown without a stack frame");
}
+ if (zend_throw_exception_hook) {
+ zend_throw_exception_hook(exception TSRMLS_CC);
+ }
+
if ((EG(current_execute_data)->opline+1)->opcode == ZEND_HANDLE_EXCEPTION) {
/* no need to rethrow the exception */
return;
ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC);
ZEND_API void zend_clear_exception(TSRMLS_D);
+ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);
+
/* show an exception using zend_error(E_ERROR,...) */
ZEND_API void zend_exception_error(zval *exception TSRMLS_DC);