Dobjects Error Thowing
| From: | Mike Carter | Date: | Tue, 17 Jun 2003 11:59:13 +0000 |
| Subject: | Dobjects Error Thowing | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-6036@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-dataobject.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));
The above displays false - so its not an error object.
What could I be doing wrong?
Thanks in advance,
--
Mike Carter [web developer]
tel: 01925 758229 // fax: 01925 758023 // web: www.koa.uk.com
This message is confidential.
Unless you are the named addressee or their delegated representative you may
not use, disclose, or copy the contents of the e-mail. If you are not the
named addressee please notify the sender immediately and delete the material
from your computer. Any views or opinions contained in this e-mail are
solely those of the author unless expressly stated otherwise
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.489 / Virus Database: 288 - Release Date: 6/10/2003
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________