Convert fatal errors into EngineExceptions

This commit is contained in:
Dmitry Stogov 2015-04-01 20:01:57 +03:00
parent 0295d89d45
commit ec760d8fff
9 changed files with 132 additions and 109 deletions

View file

@ -84,7 +84,7 @@ ZEND_API void zend_objects_destroy_object(zend_object *object)
if (object->ce != EG(scope)) {
zend_class_entry *ce = object->ce;
zend_error(EG(current_execute_data) ? E_ERROR : E_WARNING,
zend_error(EG(current_execute_data) ? E_EXCEPTION | E_ERROR : E_WARNING,
"Call to private %s::__destruct() from context '%s'%s",
ce->name->val,
EG(scope) ? EG(scope)->name->val : "",
@ -97,7 +97,7 @@ ZEND_API void zend_objects_destroy_object(zend_object *object)
if (!zend_check_protected(zend_get_function_root_class(destructor), EG(scope))) {
zend_class_entry *ce = object->ce;
zend_error(EG(current_execute_data) ? E_ERROR : E_WARNING,
zend_error(EG(current_execute_data) ? E_EXCEPTION | E_ERROR : E_WARNING,
"Call to protected %s::__destruct() from context '%s'%s",
ce->name->val,
EG(scope) ? EG(scope)->name->val : "",