Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62077 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13484 invoked from network); 7 Aug 2012 05:46:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Aug 2012 05:46:32 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.203 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.203 smtp203.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.203] ([67.192.241.203:48384] helo=smtp203.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/5B-03102-7BBA0205 for ; Tue, 07 Aug 2012 01:46:31 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp10.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 658A61B8144; Tue, 7 Aug 2012 01:46:28 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp10.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 151811B81DD; Tue, 7 Aug 2012 01:46:28 -0400 (EDT) Message-ID: <5020ABB3.7060400@sugarcrm.com> Date: Mon, 06 Aug 2012 22:46:27 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Anthony Ferrara CC: PHP Internals References: <501F46BE.4040407@sugarcrm.com> <50200FBD.2010506@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Error handling brainstorming From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > circumstance. If it's not, you should be checking for existence first > (via file_exists() or is_readable(), etc)... This is exactly how we got into this mess with $x = isset($a['x'])?$a['x']:null; We're trying to get out of this mess and you're proposing to build another mess just like that. > errors, you can't just fread the return value. You *need* to change your > execution flow based on that error. Therefore, it is exceptional. That's exactly what I am saying. Exceptions should not be a means of flow control, and that's exactly what are you doing here. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227