Re: Try Catch
| From: | (Oleg Rekutin) | Date: | Sun, 22 Jul 2001 00:08:07 +0000 |
| Subject: | Re: Try Catch | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-947@lists.php.net to get a copy of this message | ||
Yes, this is a good idea! Then it would be possible to stack callbacks,
which would make life slightly easier (i.e. callback returns true or false..
if it returns false, the callback stack is popped and the previous callback
is called.. etc)..
- Oleg
Stig.Bakken@fast.no (Stig S. Bakken) wrote in
news:3B5A185F.7C31368E@fast.no:
> I think a more generic solution would be to make error handlers a
> stack, so you can "push" and "pop" any number of temporary error
> handlers:
>
> class foo {
> function fooBar() {
> $db = new DB_Bar;
> $db->pushErrorHandling(PEAR_ERROR_RETURN);
> $db->query(...);
> $db->popErrorHandling();
> }
> }