Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83161 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61662 invoked from network); 19 Feb 2015 09:12:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2015 09:12:13 -0000 X-Host-Fingerprint: 80.177.120.119 marston-home.demon.co.uk Received: from [80.177.120.119] ([80.177.120.119:17672] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/85-22021-DE8A5E45 for ; Thu, 19 Feb 2015 04:12:13 -0500 Message-ID: <92.85.22021.DE8A5E45@pb1.pair.com> To: internals@lists.php.net References: <54E12349.7070806@gmail.com><16.9B.05176.AE1C1E45@pb1.pair.com><54E1C993.1070609@gmail.com><37.20.01961.31113E45@pb1.pair.com><54E32CAA.5030600@gmail.com> In-Reply-To: Date: Thu, 19 Feb 2015 09:12:05 -0000 Lines: 2 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 X-Posted-By: 80.177.120.119 Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine From: TonyMarston@hotmail.com ("Tony Marston") "Nikita Nefedov" wrote in message news:CALuY8tjUq70eLkV-MbDi-fEXZvWTFi82zCNmWr7tmvpiES9=Pw@mail.gmail.com... > >On 18 Feb 2015 13:53, "Tony Marston" wrote: >> >> Could it be restricted to the current scope? In your example the call to >fopen() exists in the load_data() function and is not in a try ... catch >block within *that* function, so the fact that the call to load_data() is >within a try ... catch block should be irrelevant as it is in a different >scope. > >Hi Tony, > >This sounds very hacky. You could say that every piece of code is a "hack" with the only difference being that some hacks are ugly while others are beautiful. > If you want exceptions with file/stream functions I >suggest you to find some open library out there that can handle your user >case or you can use SplFileObject. -- Tony Marston