Re: Exception Handling

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

 



James Colannino <crankycyclops@xxxxxxxxx> hat am 1. Juni 2012 um 16:25
geschrieben:

> Hey guys,
>
> Haven't posted in a long time...  Happy Memorial Day!  I have an issue
> with exception handling.  I'm using a framework that throws a
> "Database_Exception" object.  I was expecting catch (Exception $var) to
> be sufficient to catch this, but it doesn't.  I have to do catch
> (Database_Exception $var) to make it work.  I've been reading that
> Exception should be sufficient, since every exception object is a child
> class of Exception.  Did this perhaps change in 5.4?  I think it was
> working properly in 5.3, but I'm not sure.


Look at the definition of "Database_Exception" and see if it extends Exception,
I'll guess it doesn't.
Nothing changed in PHP 5.4 to that.

>
> Any clarification would be greatly appreciated!
>
> James
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: marco@xxxxxxxxxx

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz

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