Re: Error control and the like
| From: | Sam Masiello | Date: | Thu, 08 Nov 2001 15:49:45 +0000 |
| Subject: | Re: Error control and the like | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73894@lists.php.net to get a copy of this message | ||
If you are just looking for something that will display all of your
warning/error messages to show where fallibilities occur in your code, you
can use the error_reporting() function at the top of your script.
For example:
error_reporting(15); (I think error_reporting(E_ALL); is the same thing...I
always use numbers)
will show all warning/error messages. This can be disruptive sometimes, but
can be very useful for debugging and tightening up your code.
error_reporting(0);
will show a minimum amount of error messages....usually only those of the
"fatal" variety.
HTH
Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 X289
smasiello@synacor.com
----- Original Message -----
From: "GB Clark II" <gclarkii@vsservices.com>
To: <php-general@lists.php.net>
Sent: Thursday, November 08, 2001 10:46 AM
Subject: [PHP] Error control and the like
> Hi,
>
> I'm comming from a Perl background and I'm used to using evail{code;}; to
> catch things that would kill the server/program and then do things based
on
> the error code.
>
> Can anyone suggest a way to implement the same thing in PHP? I've been
> looking at some of the error control functions, but I've not seen any
> examples. Any ideas, locations or whatever?
>
> Thanks for the help.
>
> GB
>
> --
> GB Clark II | Roaming FreeBSD Admin
> gclarkii@VSServices.COM | General Geek
> CTHULU for President - Why choose the lesser of two evils?
>
> --
> 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
>