Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45100 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5594 invoked from network); 27 Jul 2009 02:52:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2009 02:52:36 -0000 Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain l-i-e.com designates 67.139.134.202 as permitted sender) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:1920] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/00-05537-4761D6A4 for ; Sun, 26 Jul 2009 22:52:36 -0400 Received: (qmail 55658 invoked by uid 98); 27 Jul 2009 02:46:00 -0000 Received: from localhost by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.05 (clamdscan: 0.88.7/9615. Clear:RC:1(127.0.0.1):. Processed in 0.087265 secs); 27 Jul 2009 02:46:00 -0000 Received: from localhost (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 27 Jul 2009 02:45:59 -0000 Received: from webmail (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Sun, 26 Jul 2009 21:45:59 -0500 (CDT) Message-ID: <2802.98.193.1248662759.squirrel@www.l-i-e.com> In-Reply-To: References: <2dedb8a0907240640i118d220fte7ed4e0285aae024@mail.gmail.com> <4A69D866.9010108@moonspot.net> Date: Sun, 26 Jul 2009 21:45:59 -0500 (CDT) To: "Matt Wilson" Cc: "Brian Moon" , "Ben Scholzen 'DASPRiD'" , internals@lists.php.net User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] RFC: Replacing errors with Exceptions From: ceo@l-i-e.com ("Richard Lynch") On Fri, July 24, 2009 11:00 am, Matt Wilson wrote: > I agree, however there are certain aspects of PHP's errors that leave > a lot to be desired. For instance, a failed fopen or a failed socket > will often result in an uncatchable warning from php. Sure, you can > add a @ to the line but that's slow and doesn't tell you anything > about what happened. > > I've been saying for years that PHP needs to get over its perl phobia > and implement something like $! > > fopen("file", "r") or throw new Exception("Error: ". $!); > > Wouldn't that be nice? No, it wouldn't. wtf is $! supposed to mean?! I don't want to know, actually. If I wanted to use a language that looks like a cat died on my keyboard, I'd just switch to perl. -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch