Re: MySQL exceptions
| From: | Jochem Maas | Date: | Mon, 09 Apr 2007 22:55:23 +0000 |
| Subject: | Re: MySQL exceptions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-252384@lists.php.net to get a copy of this message | ||
Davi wrote:
> Hi all!
>
> I'm developing an OOP app using PHP 5.
> I want to use try-catch with mysql functions.
>
> So, the question is: what are the exceptions classes of MySQL?
> Where can I found it?
IIRC mysqli (certainly not mysql) extension does not throw exceptions,
so write code that checks for errors using the relevant functions and
throw your own exceptions as you see fit.
the reasoning is that php doesn't force you to use exceptions - other
than some caveats, like the SOAP extension, some SPL classes (I think), etc.
>
> TIA
>
>