Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45081 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24245 invoked from network); 24 Jul 2009 16:00:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2009 16:00:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=shadda@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=shadda@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.228 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: shadda@gmail.com X-Host-Fingerprint: 209.85.219.228 mail-ew0-f228.google.com Received: from [209.85.219.228] ([209.85.219.228:36078] helo=mail-ew0-f228.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/90-39659-99AD96A4 for ; Fri, 24 Jul 2009 12:00:27 -0400 Received: by ewy28 with SMTP id 28so1861065ewy.23 for ; Fri, 24 Jul 2009 09:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=NKiIGcU5ifNrhZHXrY72YWn5bmvVnnnaIshFPIH3yjw=; b=qii2ZaJiOOcKfrPwJeZnCZU11VC4L9o3yQ/KpVjCOwwEkBGmFToW3zy3hRdjOwTSLp f8spJ45m1vSF4tZb7p11/ozKGU8npnlu0/LPd9jNN0Mp8j/WJKkttCPvWDCR5asV+F5r lH0DRYsXBewuJPN7nbzkwksyyN2XCHk+rZtJo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=BwhzDVQQIzY2JoBKsb2v8xr5c774dMdVBM54jPnoBc0SQadmeJ9wdarJIflnhQ7SpV jZjiZRS1Y7dBVBqVJSH/+inw5PZk7WvoFFA+ZDI0KnV1nWKVl+D8YufVnHNgLRXV2Nmc XfXRIDDjPnV+5t7JLsG4QIUJLaEgUspkLixC8= Received: by 10.210.13.17 with SMTP id 17mr4465273ebm.38.1248451223009; Fri, 24 Jul 2009 09:00:23 -0700 (PDT) Received: from mattw-mac.adknowledge.com (nat-216-21-215-250.adknowledge.com [216.21.215.250]) by mx.google.com with ESMTPS id 10sm2866790eyd.27.2009.07.24.09.00.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 24 Jul 2009 09:00:22 -0700 (PDT) Cc: Ben Scholzen 'DASPRiD' , internals@lists.php.net Message-ID: To: Brian Moon In-Reply-To: <4A69D866.9010108@moonspot.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Fri, 24 Jul 2009 11:00:09 -0500 References: <2dedb8a0907240640i118d220fte7ed4e0285aae024@mail.gmail.com> <4A69D866.9010108@moonspot.net> X-Mailer: Apple Mail (2.935.3) Subject: Re: [PHP-DEV] RFC: Replacing errors with Exceptions From: shadda@gmail.com (Matt Wilson) 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? On Jul 24, 2009, at 10:51 AM, Brian Moon wrote: > On 7/24/09 6:43 AM, Ben Scholzen 'DASPRiD' wrote: >> To you both, this is especially, for library code like Zend >> Framework. > > This tends to invalidate your entire argument IMO. Changing the > core language because something is hard in an external framework > that only a small percentage of actual PHP developers use is not a a > good reason. > > On 7/24/09 6:40 AM, Kalle Sommer Nielsen wrote: > > I'm a big -1, I don't see a big reason for wrapping all my code in a > > try/catch block when im writing flat out procedural for example, PHP > > isn't an OO-only language > > ++1 on that. > > Brian. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >