Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47700 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18076 invoked from network); 1 Apr 2010 04:25:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2010 04:25:18 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.117 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.117 us-mr1.zend.com Received: from [63.205.162.117] ([63.205.162.117:56129] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/00-17229-C2024BB4 for ; Wed, 31 Mar 2010 23:25:17 -0500 Received: from us-gw1.zend.com (us-ex1.zend.net [192.168.16.5]) by us-mr1.zend.com (Postfix) with ESMTP id D897643F73; Wed, 31 Mar 2010 21:24:17 -0700 (PDT) Received: from [192.168.27.8] ([192.168.27.8]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 31 Mar 2010 21:25:12 -0700 Message-ID: <4BB42028.1050007@zend.com> Date: Wed, 31 Mar 2010 21:25:12 -0700 Organization: Zend Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Nate Gordon CC: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Apr 2010 04:25:12.0944 (UTC) FILETIME=[52760F00:01CAD153] Subject: Re: [PHP-DEV] Serializing Closures From: stas@zend.com (Stanislav Malyshev) Hi! > prevented. The short background of what I'm doing is serializing backtraces > when errors occur so that I can better diagnose bugs my clients report. But > when a closure is passed as a function parameter somewhere in the call tree, > things just flat out exlode with the error: Hmm, serializing backtrace may be tricky - a lot of stuff there might be unserializable. In general, serializing is not meant to be used for debugging. You might have better luck with debug printing functions. But nevertheless this: > Fatal error: Exception thrown without a stack frame in Unknown on line *0* doesn't look good. It'd be nice if you made a short code example and submitted a bug about it. I think reporting there might be improved. > Thus, would it be possible to degrade this from something as severe as an > exception to being a simple warning, or just silently ignoring it and > continuing with the serialization? I would compare this to resource handles > for mysql connections and the like. Those are silently ignored. Maybe it should be null+warning? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com