How to use Exceptions with MDB2
| From: | Bjoern Fischer | Date: | Fri, 01 Jun 2007 14:45:58 +0000 |
| Subject: | How to use Exceptions with MDB2 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-27383@lists.php.net to get a copy of this message | ||
Hello!
Many methods of MDB2 return a PEAR_Error object. Is it possible to
throw an exception instead?
I've tried to do PEAR::setExceptionHandling(PEAR_ERROR_EXCEPTION) but
the exception that is thrown is't handled and I get the warning
"PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception"
Thanks,
Bjoern