summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-03-09 13:57:15 +0100
committerNikita Popov <nikic@php.net>2015-03-09 14:01:32 +0100
commit1c94ff0595bbe6f3df8058aff7252bda09dc4a15 (patch)
treeefe488bc3292d544657fca92c4347c9b872931eb /main
parent2f156c61f19a889c8ed39fe8eb3b3220555db647 (diff)
downloadphp-git-1c94ff0595bbe6f3df8058aff7252bda09dc4a15.tar.gz
Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7 Pending changes regarding naming of BaseException and whether it should be an interface.
Diffstat (limited to 'main')
-rw-r--r--main/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c
index f5c04099ea..ffbead83c8 100644
--- a/main/main.c
+++ b/main/main.c
@@ -2540,6 +2540,10 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
}
} zend_end_try();
+ if (EG(exception)) {
+ zend_exception_error(EG(exception), E_ERROR);
+ }
+
#if HAVE_BROKEN_GETCWD
if (old_cwd_fd != -1) {
fchdir(old_cwd_fd);
@@ -2665,6 +2669,9 @@ PHPAPI int php_lint_script(zend_file_handle *file)
retval = SUCCESS;
}
} zend_end_try();
+ if (EG(exception)) {
+ zend_exception_error(EG(exception), E_ERROR);
+ }
return retval;
}