2013/4/26 Julien Pauli <[email protected]>
> Hello internals,
>
> I had an idea recently with a friend, about a feature try-catch blocks
> could use.
> Let me just write an example, you will quickly understand the idea :
>
> *<?php*
> *
> *
> *try {*
> * foo();*
> * bar();*
> * baz();*
> *} catch (SomeException $e) {*
> * dosomestuff();*
> * continue; /* Here is the feature, go back to try block */*
> *} catch (Exception $e) {*
> * dosomething();*
> *}*
>
>
This seems like a BC break:
for ( ; ; ) {
try {
...
} catch (Exception $e) {
continue;
}
}
With the proposed syntax, "continue" will no longer refer to the "for" loop..
>
>
> The continue keyword would resume the execution from where it had
> diverged, according to the function which led to the SomeException
> catch block.
>
> So, in this example, if, say, bar() throws a SomeException , the code
> would then resume and execute baz() after the catch block.
>
> Just presenting the idea here, no RFC actually , I'm collecting
> thoughts and notices.
>
> Julien.Pauli
>
Lazare INEPOLOGLOU
Ingénieur Logiciel