Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42373 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70175 invoked from network); 26 Dec 2008 01:48:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Dec 2008 01:48:17 -0000 Authentication-Results: pb1.pair.com header.from=david@grudl.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=david@grudl.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain grudl.com from 209.85.218.21 cause and error) X-PHP-List-Original-Sender: david@grudl.com X-Host-Fingerprint: 209.85.218.21 mail-bw0-f21.google.com Received: from [209.85.218.21] ([209.85.218.21:57268] helo=mail-bw0-f21.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/31-60388-ED734594 for ; Thu, 25 Dec 2008 20:48:17 -0500 Received: by bwz14 with SMTP id 14so9711966bwz.23 for ; Thu, 25 Dec 2008 17:48:11 -0800 (PST) Received: by 10.103.218.19 with SMTP id v19mr3677211muq.46.1230256091658; Thu, 25 Dec 2008 17:48:11 -0800 (PST) Received: from ?192.168.1.53? ([77.240.188.66]) by mx.google.com with ESMTPS id t10sm19296986muh.31.2008.12.25.17.48.09 (version=SSLv3 cipher=RC4-MD5); Thu, 25 Dec 2008 17:48:10 -0800 (PST) Message-ID: <49543783.50309@grudl.com> Date: Fri, 26 Dec 2008 02:46:43 +0100 User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: PHP internals Content-Type: multipart/alternative; boundary="------------090000000808090802020007" Subject: Tip for 5.3: exceptions in __toString and __autoload From: david@grudl.com (David Grudl) --------------090000000808090802020007 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit 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 --------------090000000808090802020007--