} else {
strcpy(ex_class_name, "Unknown Exception");
}
-#if 1 /* support set_exception_handler() */
if (EG(user_exception_handler)) {
zval *orig_user_exception_handler;
zval ***params, *retval2, *old_exception;
zval_ptr_dtor(EG(return_value_ptr_ptr));
local_retval = NULL;
}
-#else
- zend_exception_error(EG(exception) TSRMLS_CC);
- zval_ptr_dtor(&EG(exception));
- EG(exception) = NULL;
-#endif
} else if (!retval) {
zval_ptr_dtor(EG(return_value_ptr_ptr));
local_retval = NULL;
}
EG(exception) = exception;
}
+ if (!EG(current_execute_data)) {
+ zend_error(E_ERROR, "Exception thrown without a stack frame");
+ }
+
if ((EG(current_execute_data)->opline+1)->opcode == ZEND_HANDLE_EXCEPTION) {
/* no need to rethrow the exception */
return;