public function handleErrors($msg_prefix = '', $msg_suffix = '', $user_error_handling = false)
    {
        if (libxml_get_last_error() !== false) {
            $errors = libxml_get_errors();
            libxml_clear_errors();
            libxml_use_internal_errors($user_error_handling);

            throw new DOMException(
                $msg_prefix .
                $this->getErrorMessage($errors) .
                $msg_suffix
            );
        }

        libxml_use_internal_errors($user_error_handling);
    }
public function handleErrors($msg_prefix = '', $msg_suffix = '', $user_error_handling = false)
    {
        if (libxml_get_last_error() !== false) {
            $errors = libxml_get_errors();
            libxml_clear_errors();
            libxml_use_internal_errors($user_error_handling);

            throw new DOMException(
                $msg_prefix .
                $this->getErrorMessage($errors) .
                $msg_suffix
            );
        }

        libxml_use_internal_errors($user_error_handling);
    }
public function handleErrors ( $ msg_prefix = '' , $ msg_suffix = '' , $ user_error_handling = false ) { if ( libxml_get_last_error ( ) !== false ) { $ errors = libxml_get_errors ( ) ; libxml_clear_errors ( ) ; libxml_use_internal_errors ( $ user_error_handling ) ; throw new DOMException ( $ msg_prefix . $ this -> getErrorMessage ( $ errors ) . $ msg_suffix ) ; } libxml_use_internal_errors ( $ user_error_handling ) ; }
Checks for internal libxml errors and throws them in form of a single DOMException.
If no errors occured, then nothing happens.

@param string $msg_prefix Is prepended to the libxml error message.
@param string $msg_suffix Is appended to the libxml error message.
@param bool $user_error_handling Allows to enable or disable internal libxml error handling.

@throws DOMException
Checks for internal libxml errors and throws them in form of a single DOMException . If no errors occured then nothing happens .