RE: [PEAR] Dobjects Error Thowing

From: Date: Tue, 17 Jun 2003 12:25:08 +0000
Subject: RE: [PEAR] Dobjects Error Thowing
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6037@lists.php.net to get a copy of this message
> Hi, > > I'm just testing my failsafe code for when a > DataObject::insert() fails. > The method seems to just return key value/false. Yet the > documentation @ > http://devel.akbkhome.com/peardoc2/package.database.db-dataobj > ect.db-dataobj > ect.insert.html indicates that an error is thrown. How do I > catch the error > in PEAR/PHP ? > > $dbResult = $dbCapture->insert(); > Var_dump(PEAR::isError($dbResult)); if (!$dbResult) { die($dbCapture->last_error->getMessage()); } At least that is what i understood from the code. Arnaud.

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