This code throws *Fatal error*: Method test::__toString() must not throw an exception

class Test1
{
   public function __toString()
   {
       throw new Exception;
   }
}

The same problem causes throwing exceptions in function __autoload.

I think this behavior is against the logic of exceptions. Excellent feature of PHP 5.3 would be to resolve this errors.

David Grudl

Reply via email to