Re: Error control and the like
| From: | GB Clark II | Date: | Thu, 08 Nov 2001 16:37:39 +0000 |
| Subject: | Re: Error control and the like | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73908@lists.php.net to get a copy of this message | ||
On Thursday 08 November 2001 09:49, Sam Masiello wrote:
> 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.
>
No, What you've described is like the perl 'use strict' and '-w'.
Let me give you an example of what I'm wanting in pseudo-code.
connect to database
exec query
error in query
catch error
rollback database
It is almost like exceptions.
Thanks,
GB
> ----- 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
--
GB Clark II | Roaming FreeBSD Admin
gclarkii@VSServices.COM | General Geek
CTHULU for President - Why choose the lesser of two evils?