xslt_error

Returns an error string

&reftitle.description; `string` `xslt_error` `resource` `xh`

Returns a string describing the last error that occurred on the passed XSLT processor.

&reftitle.parameters;

&xslt.parameter.xh;
&reftitle.returnvalues;

Returns the error message, as a string.

&reftitle.examples;

### Handling errors using the `xslt_error` and `xslt_errno` functions.

    <?php

    $xh = xslt_create();
    $result = xslt_process($xh, 'dog.xml', 'pets.xsl');
    if (!$result) {
        die(sprintf("Cannot process XSLT document [%d]: %s",
                    xslt_errno($xh), xslt_error($xh)));
    }

    echo $result;

    xslt_free($xh);
    ?>

&reftitle.seealso;

- `xslt_errno`