Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73678 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35314 invoked from network); 13 Apr 2014 07:12:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2014 07:12:33 -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 108.166.43.99 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.99 smtp99.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.99] ([108.166.43.99:41465] helo=smtp99.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/81-21843-0E83A435 for ; Sun, 13 Apr 2014 03:12:32 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp5.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 3D3D41B06DF; Sun, 13 Apr 2014 03:12:30 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp5.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 9906F1B06F2; Sun, 13 Apr 2014 03:12:28 -0400 (EDT) Message-ID: <534A38DB.10100@sugarcrm.com> Date: Sun, 13 Apr 2014 00:12:27 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Marco Schuster CC: Kris Craig , Julien Pauli , Rowan Collins , PHP Internals References: <53446FC5.7000001@gmail.com> <53459231.2080402@gmail.com> <5345AE83.1070506@sugarcrm.com> <53482BE0.4060005@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PHP.next] Error-handling using "Error Events" From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > You manually have to reconstruct the stack trace from the exception Not sure what you mean here - exception would have the whole stack trace, why anything will need to be reconstructed? > handler; also, with this approach you lose the ability to fine-control > where you want to react on which exceptions in which way - unless you > do a save/restore every time... Not clear here either - save/restore what? > Also, you need to parse the error string by PHP (e.g. in one code > block you do a fopen followed by a mysqli_connect, both might throw > you a E_WARNING) in order to find out what's going on. This is true, but not sure how autoconverting errors to exceptions with ini_set would change that - unless you change every piece of code to use individual exception class - which is a huge chunk of work and goes way beyond ini setting - you still have no idea what happens without checking the message, exception or not. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227