Re: Short question: PEAR_ERROR_EXCEPTION
| From: | Martin Jansen | Date: | Sat, 21 Jul 2007 19:20:51 +0000 |
| Subject: | Re: Short question: PEAR_ERROR_EXCEPTION | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47660@lists.php.net to get a copy of this message | ||
On Sat Jul 21, 2007 at 09:1546PM +0200, Christian Weiske wrote:
> > All the PEAR packages (for example MDB2) are still using
> > PEAR::raiseError(). Because of that a get PHP warning triggered by
> > PEAR when an error occurs.
> >
> > I suppose there's no work around for that?
>
> Use the following line at the beginning of your code:
> PEAR::setErrorHandling(PEAR_ERROR_EXCEPTION);
I suppose that he was referring to the warning that is emitted by
$obj = new PEAR_Error($message, $code, PEAR_ERROR_EXCEPTION);
- Martin