Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67823 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93552 invoked from network); 25 Jun 2013 19:50:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jun 2013 19:50:34 -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 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:47689] helo=smtp99.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/F1-18197-984F9C15 for ; Tue, 25 Jun 2013 15:50:33 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp5.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id E04D41B00D0; Tue, 25 Jun 2013 15:50:30 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp5.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 161EA1B009C; Tue, 25 Jun 2013 15:50:28 -0400 (EDT) Message-ID: <51C9F485.6050709@sugarcrm.com> Date: Tue, 25 Jun 2013 12:50:29 -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: Michael Wallner CC: Joost Koehoorn , "internals@lists.php.net" References: <4ED7146272E04A47B986ED49E771E347BB4DF6F235@Ikarus.ameusgmbh.intern> <51C9DED2.5080401@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RE: Announcing RFC 'Anonymous Catches' From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > IMO actually it *makes* the code clearer, because $ignoredException is > not used, though a variable name like $ignored is self-explanatory, > too. It's not used by you - which btw is usually not a good idea - if you've got an exception, you usually should somehow react to it - at least log it or something, that's what the exceptions are for, if the situation does not require special handling it shouldn't be an exception. But it may be very useful for debugging, for example. Especially if somebody other than you looks at this code and tries to figure out what is going on. Removing vital information - like ability to see which exception was thrown - just to save 3 keystrokes - looks like a very misguided idea to me. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227