Re: DB: do I need to check if (DB::isError($res)) if I setErrorHandling() to callback function?

From: Date: Mon, 22 Aug 2005 16:49:46 +0000
Subject: Re: DB: do I need to check if (DB::isError($res)) if I setErrorHandling() to callback function?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20521@lists.php.net to get a copy of this message
On 8/22/05, l Burnerheimerton <lburnerheimerton@yahoo.com> wrote: > 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. -- Justin Patrin

« previous php.pear.general (#20521) next »