Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67463 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11550 invoked from network); 23 May 2013 20:31:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 May 2013 20:31:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.163 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.163 smtp163.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.163] ([67.192.241.163:54589] helo=smtp163.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/B0-07805-AAC7E915 for ; Thu, 23 May 2013 16:31:39 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp26.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 421F9804AB for ; Thu, 23 May 2013 16:23:34 -0400 (EDT) X-Virus-Scanned: OK Received: from smtp107.ord1c.emailsrvr.com (smtp107.ord1c.emailsrvr.com [108.166.43.107]) by smtp26.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTPS id 288498049B for ; Thu, 23 May 2013 16:23:34 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp6.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 9FB8198105; Thu, 23 May 2013 16:22:33 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp6.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 5E33698166; Thu, 23 May 2013 16:22:33 -0400 (EDT) Message-ID: <519E7A88.5070208@sugarcrm.com> Date: Thu, 23 May 2013 13:22:32 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: "internals@lists.php.net" CC: Sebastian Bergmann References: <519E797D.7040405@php.net> In-Reply-To: <519E797D.7040405@php.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Bug #64910: Line number of $e = new Exception vs. line number of throw $e From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Derick agrees with me that this is a bug. We propose to update the file > and line properties of the exception object in the > zend_throw_exception_internal() and zend_throw_exception() functions. > > Would such a change be accepted? Does it require an RFC? On one hand, I think it makes sense - nobody really cares where the exception was created... But there's one problem here: try { //stuff } catch(Exception $e) { $logger->log("Oops, exception!"); throw $e; } If we update file/line here, we lose original exception information and file/line in the exception becomes useless. Right now, since 99.99% of the code does "throw new", it is always useful. So how you would propose to solve this? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227