RE: [PHP-DEV] error handling
| From: | John Coggeshall | Date: | Mon, 18 Nov 2002 08:09:19 +0000 |
| Subject: | RE: [PHP-DEV] error handling | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-91226@lists.php.net to get a copy of this message | ||
>Both? I'm not totally sure what you mean with "when the custom error
>handler also has errors". Can you elaborate?
Okay....
<?php
set_error_handler("myerrorhandler");
function myerrorhandler($errno, $errstr, $errfile, $errline) {
echo "There was an error.";
$int = 10 / 0 ; // Divide by zero error
}
echo "This will break
?>
Which would output something like this:
Error: There was an parse error on line X of file.php.
Additional Error: Custom error handler myerrorhandler() also errored in
line X of file.php
What I mean here is that, allow PHP to have custom error handlers for
core errors instead of just the user-defined errors.
Am I being clear?
John
>(and can you please use "> " for quoting mail?)
>
>Derick
>
>--
>
>---------------------------------------------------------------
>------------
> Derick Rethans
>http://derickrethans.nl/
> JDI Media Solutions
>--------------[
>if you hold a unix shell to your ear, do you hear the c? ]-
>
>