Re: Error control and the like
| From: | CC Zona | Date: | Thu, 08 Nov 2001 22:37:37 +0000 |
| Subject: | Re: Error control and the like | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73962@lists.php.net to get a copy of this message | ||
In article <01110810373907.34690@prime.vsservices.com>,
gclarkii@vsservices.com (Gb Clark II) wrote:
> 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.
Exception handling isn't available in PHP, but for what you want to do one
or more of these should be of assistance:
<http://www.php.net/manual/en/function.die.php>
<http://www.php.net/manual/en/function.assert.php>
<http://www.php.net/manual/en/function.set-error-handler.php>
--
CC