Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128323 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 10FF81A00BC for ; Thu, 31 Jul 2025 06:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753942769; bh=fO5L/vKr4VB+ngMrEiAaRO7XIkfcOPzb19m7se2J4Us=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GYZ4G7L7ghgTXvhw5lqKwhC9Y/HvhDGEisFldhLmmolfG6MfpA9YhNCsllEO7+jyI JR2kgCSNe+bLYREsk/vP43x13Tmcu0+9RWpmLLAyiX8ZOv6B5Q1WUPdeVh6Wwz9FCU I/sK8QF7zXHeDXF/n4K6QyeEqJaTMmNeJMfYVhCx+7V39WskuhpZMvK40vMzKNCsZD Iah+nJQBjJhKHpOol+H+NsouZR8jn4U6O6Y4+0jE2y0AyMiIeB6V2hlnnLkOXGYwug BL6wuUdYLmF/0lLXIABpUATgNRKSaZAyrgRzE5kEIgEShUslrMNLVe/85SCuybJmDN a57K+YA2FG1Nw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0818A18020B for ; Thu, 31 Jul 2025 06:19:24 +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=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS 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 forward500a.mail.yandex.net (forward500a.mail.yandex.net [178.154.239.80]) (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 06:19:23 +0000 (UTC) Received: from mail-nwsmtp-smtp-production-main-84.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-84.vla.yp-c.yandex.net [IPv6:2a02:6b8:c15:2a0e:0:640:b7ff:0]) by forward500a.mail.yandex.net (Yandex) with ESMTPS id 441258118D for ; Thu, 31 Jul 2025 09:21:03 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-84.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 1LUsN5nLx0U0-YQbD6Saf; Thu, 31 Jul 2025 09:21:02 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.watch; s=mail; t=1753942862; bh=fO5L/vKr4VB+ngMrEiAaRO7XIkfcOPzb19m7se2J4Us=; h=To:Subject:Message-ID:References:Date:From:In-Reply-To:Cc; b=aSKUJ/OR55R+MvjwynUG2Can1TrlqR0XjP+w6LqH5ptBxSzsXXMdJ6lMhCLDTUE2D DTTC14DeGiUwnkJ92HFqS2AKknURZnhqucJZev3TjuwPakrNrKp9mgMBnofWgByD3b dGfQO49zTNNLzCYMic5fo2k+2oMUAx5au42BYRFY= Authentication-Results: mail-nwsmtp-smtp-production-main-84.vla.yp-c.yandex.net; dkim=pass header.i=@php.watch Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-60bfcada295so892074a12.1 for ; Wed, 30 Jul 2025 23:21:02 -0700 (PDT) X-Gm-Message-State: AOJu0Yyekqj9m8/7AeYXiXoiTx177J+cSCFJBpRSzipLdp6e9mOgazSa QQpUCkeLuQIZXLRV0Az1uwgSNN0B1AgLii8epZT/hV4AofL8+aG0VXJCaZpOBsyJL2uXSgTOhNA tWZaaLJxOS6x0/qsL9VblTTJ3enkyCLw= X-Google-Smtp-Source: AGHT+IF0/luOW+Tcx6McWvOHFlPcKgMDGkbtpmBMz2SJzsoDndtHQTITS0fKfqXrxVDdLUq375qKVJkN9P8fWeYbuf4= X-Received: by 2002:a05:6402:2708:b0:615:957f:416b with SMTP id 4fb4d7f45d1cf-615957f4952mr4067912a12.6.1753942861799; Wed, 30 Jul 2025 23:21:01 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 31 Jul 2025 13:20:35 +0700 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXzV6VOFh86LFrj5GQ1Nxlx5CAQ_663juV9oj2Zh2whqPNayhX5IyPufZ_4 Message-ID: Subject: Re: [PHP-DEV] [RFC] Optional Catch Block Body To: Mihail Liahimov <91liahim@gmail.com> Cc: PHP internals Content-Type: text/plain; charset="UTF-8" From: ayesh@php.watch (Ayesh Karunaratne) > Motivation > > Reduced Boilerplate: Eliminates unnecessary empty blocks when exceptions only need to be caught and ignored. > Improved Readability: Makes the code more concise and focuses on the important parts. > Empty `catch` blocks are a code-smell. If the `try` block is not ready to handle the exception, it should let the exception bubble up; not silence it. I think we should not encourage this further.