Re: Try Catch
| From: | Stig S. Bakken | Date: | Mon, 23 Jul 2001 22:33:50 +0000 |
| Subject: | Re: Try Catch | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1005@lists.php.net to get a copy of this message | ||
"Tomas V.V.Cox" wrote:
>
> Yeah, good idea, but still have one problem. Think for example in the
> nextID problem:
>
> $this->pushEH(RETURN);
> $err = $db->query();
> $this->popEH();
> do {
> [...]
> } while ($repeat):
>
> // at this time we return the error, but don't
> // do action as they ocurrs at object creation time
> if (DB::isError($err)) {
> return $err;
> }
> [...]
>
> We need an extra function to "re-trigger" errors, this is: do the
> actions with the data contained in the error. I though on: a new PEAR
> method for ex: raiseErrorObject($obj), but now I can imagine also a
> PEAR_Error::raiseError.
>
> 1) return $this->raiseErrorObject($err);
> 2) return $err->raiseError();
>
> Clear not? :)
Not to me at least :-)
What do you mean with "re-triggering" errors? The actions with what
data contained in what error? :-)
- Stig