On Mon, 18 Nov 2002, John Coggeshall wrote:

> >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.

Core errors are _fatal_ because it leaves the engine in an unclean 
state. If you have a parse error then the script hasn't been parsed  
fully and thus the compilation step did not even interpreted the tokens 
generated by the parse, so how do you want PHP to execute a function then?  

Derick

-- 

---------------------------------------------------------------------------
 Derick Rethans                                   http://derickrethans.nl/ 
 JDI Media Solutions
--------------[ if you hold a unix shell to your ear, do you hear the c? ]-


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to