Re: [RFC] Exceptions in the engine
| From: | Tony Marston | Date: | Thu, 19 Feb 2015 09:12:05 +0000 |
| Subject: | Re: [RFC] Exceptions in the engine | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83161@lists.php.net to get a copy of this message | ||
"Nikita Nefedov" wrote in message news:CALuY8tjUq70eLkV-MbDi-fEXZvWTFi82zCNmWr7tmvpiES9=Pw@mail.gmail.com...
On 18 Feb 2015 13:53, "Tony Marston" <TonyMarston@hotmail.com> wrote: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.Could it be restricted to the current scope? In your example the call tofopen() 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.
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