diff options
| author | Rob Richards <rrichards@php.net> | 2003-09-03 10:11:53 +0000 |
|---|---|---|
| committer | Rob Richards <rrichards@php.net> | 2003-09-03 10:11:53 +0000 |
| commit | 5630dd0be2293fb707c40339b334dbb8b950bf52 (patch) | |
| tree | d35d4f030ff234e0f8e3d74ec8b6fbbfbdb5dfc1 /ext/dom/domexception.c | |
| parent | 93f0ee5fda6fa6d296b76d25bf85254d18fb2888 (diff) | |
| download | php-git-5630dd0be2293fb707c40339b334dbb8b950bf52.tar.gz | |
add document HTML load/save methods
add document standalone validate method
cleanup some prototype declarations
domexception inherits from default exception
Diffstat (limited to 'ext/dom/domexception.c')
| -rw-r--r-- | ext/dom/domexception.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c index ed9a46310b..a1be5cbb40 100644 --- a/ext/dom/domexception.c +++ b/ext/dom/domexception.c @@ -41,10 +41,8 @@ zend_function_entry php_dom_domexception_class_functions[] = { {NULL, NULL, NULL} }; -/* {{{ php_dom_throw_error */ void php_dom_throw_error(int error_code, int strict_error TSRMLS_DC) { - zval *dom_exception; char *error_message; switch (error_code) @@ -102,17 +100,10 @@ void php_dom_throw_error(int error_code, int strict_error TSRMLS_DC) } if (strict_error == 1) { - ALLOC_ZVAL(dom_exception); - Z_TYPE_P(dom_exception) = IS_OBJECT; - object_init_ex(dom_exception, dom_domexception_class_entry); - dom_exception->refcount = 1; - dom_exception->is_ref = 1; - add_property_long(dom_exception, "code", error_code); - add_property_stringl(dom_exception, "message", error_message, strlen(error_message), 1); - EG(exception) = dom_exception; + zend_throw_exception(dom_domexception_class_entry, error_message, error_code TSRMLS_CC); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, error_message); } } -/* }}} end php_dom_throw_error */ -#endif + +#endif /* HAVE_LIBXML && HAVE_DOM */ |
