summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-10-25 19:13:06 +0000
committerMarcus Boerger <helly@php.net>2003-10-25 19:13:06 +0000
commitcad49f1fb02f8f591f65fd3d44f27440b7c5483a (patch)
tree7dd5aa7cfebaf4db26ff95add0185e60ff75c8d8 /Zend
parent4625529abedbc73b33695822d425ab9f609483d6 (diff)
downloadphp-git-cad49f1fb02f8f591f65fd3d44f27440b7c5483a.tar.gz
And use things to throw an exception here
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_default_classes.c5
-rw-r--r--Zend/zend_exceptions.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/Zend/zend_default_classes.c b/Zend/zend_default_classes.c
index 338e5fa1b8..a47209db73 100644
--- a/Zend/zend_default_classes.c
+++ b/Zend/zend_default_classes.c
@@ -27,6 +27,7 @@
static zend_class_entry *default_exception_ptr;
static zend_object_handlers default_exception_handlers;
+ZEND_API void zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC);
static zend_object_value zend_default_exception_new(zend_class_entry *class_type TSRMLS_DC)
{
@@ -53,10 +54,10 @@ static zend_object_value zend_default_exception_new(zend_class_entry *class_type
return obj.value.obj;
}
-ZEND_METHOD(reflection, __clone)
+ZEND_METHOD(exception, __clone)
{
/* Should never be executable */
- _DO_THROW("Cannot clone object using __clone()");
+ zend_throw_exception(NULL, "Cannot clone object using __clone()", 0 TSRMLS_CC);
}
ZEND_METHOD(exception, __construct)
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 338e5fa1b8..a47209db73 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -27,6 +27,7 @@
static zend_class_entry *default_exception_ptr;
static zend_object_handlers default_exception_handlers;
+ZEND_API void zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC);
static zend_object_value zend_default_exception_new(zend_class_entry *class_type TSRMLS_DC)
{
@@ -53,10 +54,10 @@ static zend_object_value zend_default_exception_new(zend_class_entry *class_type
return obj.value.obj;
}
-ZEND_METHOD(reflection, __clone)
+ZEND_METHOD(exception, __clone)
{
/* Should never be executable */
- _DO_THROW("Cannot clone object using __clone()");
+ zend_throw_exception(NULL, "Cannot clone object using __clone()", 0 TSRMLS_CC);
}
ZEND_METHOD(exception, __construct)