summaryrefslogtreecommitdiff
path: root/Zend/zend_objects.c
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2015-07-03 13:41:17 -0500
committerAaron Piotrowski <aaron@trowski.com>2015-07-03 17:53:40 -0500
commit5a99c07eccb09c3c8b9f6fe4b83020163aad6498 (patch)
tree2405c51d16e14ca24fed2811148220388798b222 /Zend/zend_objects.c
parent866bd89b1d909795bd5ae72121089aef5e0fb204 (diff)
downloadphp-git-5a99c07eccb09c3c8b9f6fe4b83020163aad6498.tar.gz
Enable throwing custom exceptions from errors
Diffstat (limited to 'Zend/zend_objects.c')
-rw-r--r--Zend/zend_objects.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index 6dc1a2d076..cc26aa98d9 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -93,7 +93,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_EXCEPTION | E_ERROR : E_WARNING,
+ zend_throw_error(zend_ce_error, EG(current_execute_data) ? E_EXCEPTION : E_WARNING,
"Call to private %s::__destruct() from context '%s'%s",
ZSTR_VAL(ce->name),
EG(scope) ? ZSTR_VAL(EG(scope)->name) : "",
@@ -106,7 +106,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_EXCEPTION | E_ERROR : E_WARNING,
+ zend_throw_error(zend_ce_error, EG(current_execute_data) ? E_EXCEPTION : E_WARNING,
"Call to protected %s::__destruct() from context '%s'%s",
ZSTR_VAL(ce->name),
EG(scope) ? ZSTR_VAL(EG(scope)->name) : "",