Re: [PHP] Exception not being caught

2009-07-16 Thread David Otton
2009/7/15 Weston C west...@gmail.com: ?php class A { } $a = new A();                           // Ayn would be proud, right? try {    echo a is ,$a,\n; } catch(Exception $e) {    echo \nException Caught: ;    echo $e, $n; } ? This does not run as expected. I'd think that when the

Re: [PHP] Exception not being caught

2009-07-16 Thread Martin Scotta
There are many examples of error_handlers at http://ar.php.net/manual/es/function.set-error-handler.php The handler only have to cast the error to exception. YOu can write a simple handler or a fully featured one, but the essence is the same... function errorHandler(/*args*/) { $e = new