Re: MySQL exceptions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux