RE: [PEAR] DB: do I need to check if (DB::isError($res)) if I setErrorHandling() to callback function?
| From: | Chris Boget | Date: | Tue, 23 Aug 2005 07:16:59 +0000 |
| Subject: | RE: [PEAR] DB: do I need to check if (DB::isError($res)) if I setErrorHandling() to callback function? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-20533@lists.php.net to get a copy of this message | ||
> > I am trying to streamline and standardize my code. I recently
added:
> > $db->setErrorHandling(PEAR_ERROR_CALLBACK,
> > 'db_Error_Handler');
> > Can I now go back and remove the following from all
> > pages:
> > if (DB::isError($res)) {
> > die($res->getMessage());
> > }
> > or do I still need it? Either way, why?
> If all you're doing is calling die() then, no you don't need both. One
or the other should be fine.
And if you aren't just calling die()?
thnx,
Chris