Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67190 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12939 invoked from network); 29 Apr 2013 15:00:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2013 15:00:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain strojny.net from 46.4.40.248 cause and error) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 46.4.40.248 milch.schokokeks.org Received: from [46.4.40.248] ([46.4.40.248:58782] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/E1-00193-E1B8E715 for ; Mon, 29 Apr 2013 11:00:47 -0400 Received: from [192.168.178.32] (ppp-46-244-146-68.dynamic.mnet-online.de [::ffff:46.244.146.68]) (AUTH: PLAIN lars@schokokeks.org, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by milch.schokokeks.org with ESMTPSA; Mon, 29 Apr 2013 08:25:29 +0200 id 000000000000002A.00000000517E1259.00006C9F Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) In-Reply-To: Date: Mon, 29 Apr 2013 08:25:29 +0200 Cc: PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <2284A817-6E8E-44AB-BEF2-2BA1923A3BAA@strojny.net> References: To: Julien Pauli X-Mailer: Apple Mail (2.1503) Subject: Re: [PHP-DEV] Continued try blocks From: lars@strojny.net (Lars Strojny) Hi Julien, I'm still on the fence, not sure if it isn=92t too opaque. Am 26.04.2013 um 16:41 schrieb Julien Pauli : [...] One question regarding scoping: does the next statement inherit the = scope of the catch block like this? try { $user =3D $repository->findById(123); $user->setName($name); $em->save($user); return true; } catch (NotFoundException $e) { $user =3D new User(); continue; } catch (ValidationException $e) { $user->setName($this->stripInvalidChars($name)); continue; } catch (PersistenceException $e) { return false; } cu, Lars=