Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128346 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id B09491A00BC for ; Thu, 31 Jul 2025 15:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753975232; bh=+NxMu1ngBqLUQHy1e00J43m7iF9YmuBuVnF6fSBYVbw=; h=Date:From:To:In-Reply-To:References:Subject:From; b=BrbWaeXN4VJ0EFuMUtIUhfIqR+CzWs/9iold9cxHWzDIW3A0U1Dy+D0xe5dWfQzAc s9qdN3JYNA15f09zQ01VlgADngpPMqCBySL7HjNOUHTzxHbaQcBlAdm04KO7cjx4r7 I2wkiiKUpZrTJpfxiJvX2O2zANlDJDRFuAdhgIGc9raOIpuk4ls+Ets0W/vxV9nUlv TGCpq1IKo4IMrkmEpgKAWY1RKUNgoi4uxzqaJ43ka3x0ccvcbneKbHy/3yGxAqbDK2 32QjgcZFB54H9lXoL/ZA4ckKdjIwIcmkVsdzruA8FbvJRSJUyj3AKadTCp2mrBscTg HNemelPMwf3Fw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DAEB418006C for ; Thu, 31 Jul 2025 15:20:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: *** X-Spam-Status: No, score=3.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DMARC_NONE,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 31 Jul 2025 15:20:31 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 54B777A0322 for ; Thu, 31 Jul 2025 11:22:13 -0400 (EDT) Received: from phl-imap-08 ([10.202.2.84]) by phl-compute-04.internal (MEProxy); Thu, 31 Jul 2025 11:22:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1753975333; x=1754061733; bh=ng6ICo25GERV7ICCdpULeAkdopPUqdPXk2v g+ns0sW0=; b=LAENWM5Sxb0JapPDnQqVAx3OH9AXForz4MI0dY06AN2UCYbWg1f 7FbP8P5KOy/t1cZ+eqsY9pe3ZP1RXM5VBtZFcu+bTkvKYgfS3RGw4EXGAVxLQRG+ TmbBjQ5MTNHQ4Q/Y8i7l4u/N6vT4FP2v+uwt+x+g8Q1NZTeZji5lhIMdZ+03w2TV lEvvXQNBmKMNim66Hqc4dEA7Q9Se7Dg0AXKjq/McoH3MXp16KAMNtwtmsMr60on5 xWaTVEPiOHzs4/Gw6GGZ5awOxM59h+ZI9BZlv3frd1NhP+AOEmCl6ZPkkTVTzzEl 2WSg5zAv6tstfp90M0CDfBVOkntHZaASAXA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddutdduudeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefoggffhffvkfgjfhfutgesrgdtreerre dttdenucfhrhhomhepfdevrghsphgvrhcunfgrnhhgvghmvghijhgvrhdfuceolhgrnhhg vghmvghijhgvrhesphhhphdrnhgvtheqnecuggftrfgrthhtvghrnhepveejheeileevle ektdehueevvdfhhfdtjeelkeejkeffgeevgeevvddtvdehheeunecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrnhhgvghmvghijhgvrhesph hhphdrnhgvthdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id4f946ef:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 00F8B2CE0071; Thu, 31 Jul 2025 11:22:12 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: Tfaf6417285135238 Date: Thu, 31 Jul 2025 17:21:37 +0200 To: internals@lists.php.net Message-ID: <94a57a5c-41bc-442d-a5e3-13eaea29053b@app.fastmail.com> In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC] Optional Catch Block Body Content-Type: multipart/alternative; boundary=de076156239b4131b77d0408bc5db0e8 From: langemeijer@php.net ("Casper Langemeijer") --de076156239b4131b77d0408bc5db0e8 Content-Type: text/plain Content-Transfer-Encoding: 7bit On Thu, Jul 31, 2025, at 06:53, Mihail Liahimov wrote: > Proposal > > Allow the following syntax where the curly braces can be omitted when no exception variable is specified and no handling is needed: > > try { > // code that may throw > } catch (SomeError); Can you write out how this would interoperate with the finally keyword? --de076156239b4131b77d0408bc5db0e8 Content-Type: text/html Content-Transfer-Encoding: 7bit


On Thu, Jul 31, 2025, at 06:53, Mihail Liahimov wrote:
Proposal

Allow the following syntax where the curly braces can be omitted when no exception variable is specified and no handling is needed:

try {
    // code that may throw
} catch (SomeError);

Can you write out how this would interoperate with the finally keyword?
--de076156239b4131b77d0408bc5db0e8--