Re: Exception Handling

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

 



Am 01.06.12 17:08, schrieb James Colannino:
>
> Hey Marco,
>
> Thanks for the reply!  That was the first thing I checked.
>
> class Database_Exception extends \FuelException {}
> class Fuel_Exception extends \Exception {}
>
> It's extending Exception, as expected.  Also, can you throw classes
> that don't extend Exception?  It was always my understanding that
> doing so would cause a fatal error.

Ah, I guess that is the problem. Your application framework uses namespaces.
I guess you should try

catch (\Exception $e)

instead of

catch (Exception $e)

:-)

>
> James
>


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


Attachment: signature.asc
Description: OpenPGP digital signature


[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