Newsgroups: php.doc,php.internals Path: news.php.net Xref: news.php.net php.doc:969378362 php.internals:33403 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85756 invoked by uid 1010); 23 Nov 2007 20:56:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 85725 invoked from network); 23 Nov 2007 20:56:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2007 20:56:08 -0000 X-Host-Fingerprint: 24.228.86.142 ool-18e4568e.dyn.optonline.net Received: from [24.228.86.142] ([24.228.86.142:23653] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/A0-15279-56E37474 for ; Fri, 23 Nov 2007 15:56:06 -0500 Message-ID: <7A.A0.15279.56E37474@pb1.pair.com> To: internals@lists.php.net,phpdoc@lists.php.net Date: Fri, 23 Nov 2007 15:55:55 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.6.0.104 MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Posted-By: 24.228.86.142 Subject: Re: Quick question before submitting a feature request... From: edwardzyang@thewritingpot.com ("Edward Z. Yang") Ken Stanley wrote: > The problem that I run into, that I feel could be improved, is that if the > view class throws the exception during exception handling, I get the error, > "Fatal error: Exception thrown without a stack frame in Unknown on line 0." This may be a documentation problem. set_exception_handler() is often touted as an easy way to define a global try/catch block, but it's not meant to call a complex View subsystem to render the error, after all, it occurs during the destructor phase. At the very least, the documentation should mention that throwing an exception from inside this handler will result in a fatal error. I think, however, it should actively encourage using a global try {} catch {} block. I understand this solution won't work if application Exceptions don't have a common parent class, but this is already recommended as a good practice. -- Edward Z. Yang GnuPG: 0x869C48DA HTML Purifier Anti-XSS Filter [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]