Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73653 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2824 invoked from network); 9 Apr 2014 18:32:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2014 18:32:23 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.169 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.169 mail-wi0-f169.google.com Received: from [209.85.212.169] ([209.85.212.169:60791] helo=mail-wi0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/78-33769-63295435 for ; Wed, 09 Apr 2014 14:32:23 -0400 Received: by mail-wi0-f169.google.com with SMTP id hm4so9978186wib.2 for ; Wed, 09 Apr 2014 11:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=9RoGiiawt0cma6sUqIHYqe+teN9mHYOm7n/cHdJhDYU=; b=hAxZGbVp3I6urFppsZKl23y4rp+iKNAGwEBo9sI3zceGvgwJXlMXY/BCHqKGY27sfI UwRw6Kh33glCO1S4ah4o0nZ3H/HGVK3mTBgc6JnKMHlwP7aqSf/8d3dHPqXQStlEUDyw p436cGqKICKfDyhGnSSn4PrqKVakPX9CNv3dBqasNb53f64gZkArnve0niRVEvQqsiRG pxQLjq2npT0vw4e+bpcxWB3X9V5ecV3zGOfTLk3DZvPlBP/sDZgiFlRdyLWEO96EypAd 0yvsSQ0q3ZyLeFqNPrHbS5LFiIKWTnUJAvkWr2MqgzkSU2OxTsePS5rWhteyFBp/ifcj IA+w== X-Received: by 10.180.10.66 with SMTP id g2mr38561724wib.5.1397068339012; Wed, 09 Apr 2014 11:32:19 -0700 (PDT) Received: from [192.168.0.177] ([62.189.198.114]) by mx.google.com with ESMTPSA id cw2sm2795918wjb.39.2014.04.09.11.32.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 11:32:18 -0700 (PDT) Message-ID: <53459231.2080402@gmail.com> Date: Wed, 09 Apr 2014 19:32:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Marco Schuster CC: PHP Internals References: <53446FC5.7000001@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------020101050209030005030308" Subject: Re: [PHP-DEV] [PHP.next] Error-handling using "Error Events" From: rowan.collins@gmail.com (Rowan Collins) --------------020101050209030005030308 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Marco Schuster wrote (on 09/04/2014): > The fopen shut-up actually could be resolved much, much more elegant: > make it throw*real, usable exceptions*, instead of returning a FALSE > and spitting out a warning. Good point. Perhaps the real question is: what are the use cases - real or perceived - for the @ operator, and how, if we were re-organising error and message handling in general, can they best be replaced. The only problem is that changing the behaviour of such a basic function is quite a major compatibility break, and there may need to be some way of switching to the old behaviour in order to use code which pre-dates the change, or write code which works in both versions. > Something like DomainNotFoundException, ConnectionDeniedException, > FileNotFoundException or whatnot. It's a nightmare if you actually > want to know what happened. The problem with such specific exceptions in this case is that different stream wrappers would want to throw completely different exceptions; I guess they could all extend a generic FileAccessException. Regards, -- Rowan Collins [IMSoP] --------------020101050209030005030308--