Re: DB: do I need to check if (DB::isError($res)) if I setErrorHandling() to callback function?
| From: | Justin Patrin | Date: | Tue, 23 Aug 2005 16:19:58 +0000 |
| Subject: | Re: DB: do I need to check if (DB::isError($res)) if I setErrorHandling() to callback function? | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20544@lists.php.net to get a copy of this message | ||
On 8/23/05, Massimiliano Arione <garak@studenti.it> wrote:
> Justin Patrin wrote:
> > If all you're doing is calling die() then, no you don't need both. One
> > or the other should be fine.
>
> And what if not?
> I use the callback without die() and don't use error check.
> I didn't have problem until now. Am I wrong?
>
If you use the callback but don't exit the script in some way then you
*are* going to have errors in your scripts. Likely "method does not
exist" errors. If you do logging and such and *then* die() or exit
you're still fine.
--
Justin Patrin