View Single Post

  #5 (permalink)  
Old 07-25-2003
Tony Marston
 
Posts: n/a
Default Re: Handling the error_handler

"Nigel A. Chapman" <nchapman@bigpond.com> wrote in message news:<p87Ua.13944$OM3.8867@news-server.bigpond.net.au>...
> Tony Marston wrote:
>
> >>"Note: The following error types cannot be handled with a user defined
> >>function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING,
> >>E_COMPILE_ERROR and E_COMPILE_WARNING."

>
> > Take a look at http://www.tonymarston.net/php-mysql/errorhandler.html
> > which shows you how to create an error handler which will send an
> > email if a fatal error is encountered.

>
> I'll give it a run, but I don't see from your code how your
> user-defined-error function gets around the above-mentioned limitation
> in PHP. Does it really respond to parsing errors?


No. If a parsing error occurs then your script won't even run (this
will be detected when you test your script). My error handler will
trap runtime errors.

Try using it, and force a few runtime errors just to see what happens.

Tony Marston
http://www.tonymarston.net/
Reply With Quote