Re: Trapping PHP errors
| From: | (Delbono) | Date: | Tue, 27 Jun 2000 01:09:27 +0000 |
| Subject: | Re: Trapping PHP errors | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3259@lists.php.net to get a copy of this message | ||
FROM:
Manual/debugger.html#DEBUGGER-USING
To report errors from an internal function, you should call the php3_error()
function. This takes at least two parameters -- the first is the level of
the error, the second is the format string for the error message (as in a
standard printf() call), and any following arguments are the parameters for
the format string. The error levels are: ...
Nicola Delbono
----- Original Message -----
From: "Graeme Merrall" <graeme@inetix.com.au>
To: "D" <drago@0x00.org>
Cc: <php-general@lists.php.net>
Sent: Tuesday, June 27, 2000 3:06 AM
Subject: Re: [PHP-GENERAL] Trapping PHP errors
> D wrote:
> >
> > Hey,
> >
> > Is there any function to trap the php errors? Like if there is a
> > mysql or some other runtime handler. I would like to be able to have my
> > custom function called each time a runtime error occurs.
> >
> > I examined the source but all I was able to find was
> > set_user_error_handler() off the zend tree, but that seems to be
internal
> > to zend.
> With things like MySQL (and others) you can call your function with an @
> at the front which hides the error and then pops the error message into
> mysql_error and simiar functions. I'm sure there's a PHP error var as
> well but I forget :)
>
> Cheers,
> Graeme
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>