{NULL, NULL, NULL}
};
+/* {{{ php_dom_throw_error_with_message */
+void php_dom_throw_error_with_message(int error_code, char *error_message, int strict_error TSRMLS_DC)
+{
+ if (strict_error == 1) {
+ zend_throw_exception(dom_domexception_class_entry, error_message, error_code TSRMLS_CC);
+ } else {
+ php_libxml_issue_error(E_WARNING, error_message TSRMLS_CC);
+ }
+}
+
/* {{{ php_dom_throw_error */
void php_dom_throw_error(int error_code, int strict_error TSRMLS_DC)
{
error_message = "Unhandled Error";
}
- if (strict_error == 1) {
- zend_throw_exception(dom_domexception_class_entry, error_message, error_code TSRMLS_CC);
- } else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", error_message);
- }
+ php_dom_throw_error_with_message(error_code, error_message, strict_error TSRMLS_CC);
}
/* }}} end php_dom_throw_error */
#endif
int dom_get_strict_error(php_libxml_ref_obj *document);
void php_dom_throw_error(int error_code, int strict_error TSRMLS_DC);
+void php_dom_throw_error_with_message(int error_code, char *error_message, int strict_error TSRMLS_DC);
void node_list_unlink(xmlNodePtr node TSRMLS_DC);
int dom_check_qname(char *qname, char **localname, char **prefix, int uri_len, int name_len);
xmlNsPtr dom_get_ns(xmlNodePtr node, char *uri, int *errorcode, char *prefix);