Re: [RFC] Supports 'finally' keyword for PHP exceptions
| From: | Andrew Faulds | Date: | Tue, 24 Jul 2012 15:17:24 +0000 |
| Subject: | Re: [RFC] Supports 'finally' keyword for PHP exceptions | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61690@lists.php.net to get a copy of this message | ||
On 24/07/12 16:16, Rasmus Lerdorf wrote:
On 07/24/2012 06:35 AM, Nikita Popov wrote:On Tue, Jul 24, 2012 at 1:20 PM, Laruence <laruence@php.net> wrote:No it doesn't, at least not in Java. A fatal Java error or an explicit call to System.exit() will cause the finally clause to not be executed. It is a simple exception-level construct and doesn't in any way promise to be called in a fatal error situation. And regardless of what Java does, we are free to define it and provide whatever promises we want here, but keeping it in line with Java's implementation makes sense to me. -Rasmus Yeah, finally{} won't happen in absolutely any case. But if there's an exception that's uncaught it *should* still run.Hi:The finally clause comes with a very strong promise that the code in the clause will run in absolutely any case (short of sigkill, maybe).As the previous threads disscussed, I make a implemention.here is the RFC: https://wiki.php.net/rfc/finallyany suggestions?