Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67169 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12109 invoked from network); 26 Apr 2013 15:23:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2013 15:23:06 -0000 Authentication-Results: pb1.pair.com header.from=linepogl@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=linepogl@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.176 as permitted sender) X-PHP-List-Original-Sender: linepogl@gmail.com X-Host-Fingerprint: 209.85.214.176 mail-ob0-f176.google.com Received: from [209.85.214.176] ([209.85.214.176:60529] helo=mail-ob0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/94-15719-9DB9A715 for ; Fri, 26 Apr 2013 11:23:06 -0400 Received: by mail-ob0-f176.google.com with SMTP id wd20so3624205obb.35 for ; Fri, 26 Apr 2013 08:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=XdIj2FeUv+laqOrqR2fMS/4Gp4pSCPioMcgnq4sh5DA=; b=U18Bdp9zXaY2Bwl8LDZjASrj1uJv9bWZ2BptyGEx/hMP5cCh3moP5CBgYXt88l9m0i NBsfKlPCXuGJGZyVr8i/7n/0kTQa21A/ENUQFUKV07n+HMU3EtRiczBqWycYBVhk9vCD 7cehOnp6BIv8Hlqs5u580wbFnrRjrY6vF+sx1YyCIE5NAvAkhjdvxtfAihtjqEKvzPfe YAQupLFslN9L4DswL7zdOLDYeFKS+6fGmObN6RCX4L7BfAOekodu400ipE8tkuQYDO7J qQsKc73pKDf3fc3/v2oltGPNL357PDhB+uwmbAYIJ4ftlmxcUCP1OOK2AUUrEi3NgEU+ VPhQ== X-Received: by 10.182.105.2 with SMTP id gi2mr4705873obb.15.1366989783495; Fri, 26 Apr 2013 08:23:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.154.130 with HTTP; Fri, 26 Apr 2013 08:22:42 -0700 (PDT) In-Reply-To: References: Date: Fri, 26 Apr 2013 17:22:42 +0200 Message-ID: To: Julien Pauli Cc: PHP Internals Content-Type: multipart/alternative; boundary=e89a8ff1cdf074fd6704db451cea Subject: Re: [PHP-DEV] Continued try blocks From: linepogl@gmail.com (Lazare Inepologlou) --e89a8ff1cdf074fd6704db451cea Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2013/4/26 Julien Pauli > 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 : > > * * > * > *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=C3=A9nieur Logiciel --e89a8ff1cdf074fd6704db451cea--