Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128270 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 6C6FD1A00BC for ; Mon, 28 Jul 2025 15:27:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753716356; bh=0IBTQsCHGvJAcyHb8/nUQCB8nWSFDP+Rngg3K66WUQo=; h=Date:From:To:In-Reply-To:References:Subject:From; b=NI7RxJz7h9v1Yu7CMa8Be/NPzPieMPQXtdLkmQrTq31HMcdQO34U1wsAanGPC+cPD f8hZ5ZwXQrXKAEtq97bkw1TGNhizFr1/a3EEltTktHGqACZwKQeIBg43uak4YJeLbQ /6aZ2f4no+UAIYGSIi+Lt1+v6BWPGp5qdwQ2mwq7Yamlwls/SqtaBWwniVQquDW1KD xI681A1lfeZnTZHyXExKpfMJj0qNXJFJOrgd+PclrudATR3ITpaAl3xYMx6Oy22/ed ji0MZBSBcRUTelO3ryTRq31h9w7PgCRx/tY9Ct1ax/B4KwN7PDYbCgjVEZBFssC6H1 zoVKH8x5dJ2rA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 47A281801EC for ; Mon, 28 Jul 2025 15:25:55 +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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE 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 fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) (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 ; Mon, 28 Jul 2025 15:25:55 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id 97D3EEC01DE for ; Mon, 28 Jul 2025 11:27:37 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-10.internal (MEProxy); Mon, 28 Jul 2025 11:27:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1753716457; x=1753802857; bh=2654fmpSozv9gwDRpnXtJ 44nKqkJWBZSPx9YX39KcN4=; b=1flfoWZKhrtUwWZTG3USEhveZ0RAS+Fa0WiPu Wm9bGULu3Bcpym9ysTBp1aGg12Ctgj2H+HhpE65O6OwNz2xERo5aaqW+NskggTQ5 v9wGYZ5lzDOBc1fjjUVc6NwfcmiDFgyiuqwyp6pyV8aiUxoG3jISKIs5MfS29Rp2 qQBYa3I1nhzuX5TXyrBvAIa6m1F2AVBRT1gHTHFNm6cMRaZIkaxc3phe/+SDTwLF 476S6N13I5L26k4uqlRFQwQUGNJXvME7gVIb9LSVp9uQGEsZJDmWcYMxXQZM18Af z8RzRbhHwptdXsMxkqQ34XHUhHedZal+SAKfcY24C7nhyQ33g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=1753716457; x=1753802857; bh=2 654fmpSozv9gwDRpnXtJ44nKqkJWBZSPx9YX39KcN4=; b=ViQ1hMI1t74YBGQ6j nuZtWMh5+MO3l2jg8Jq9H4KDuj0i0lFRUmOt1yMY6/+0c5DHgyWRXvASvJt474Yg FOgK7f3C+SbDKtpgozbCxG7PummdpNjScEKB2mGXty20UEezbw4jZ2MU6SOzRMPy cCKzfwGS2c7OSBU5DOg2fHYahKYn5muA0Kz/HpdkPeWILfaNIVMOmSgkRFQKXJ8g raDp45PG5BU2zb8Qp5AurwqkzU74aNNqYHMrPKP6MmDRXjuAm3fDuGHoSVDHfVB7 FZH4fIdm0bDGpawd2Qa426O0gjfmdqZgc/lZpKbzi0LiXwU+SwECBTydjsMM+Fgb +MG4A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdelvdehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedfnfgrrhhrhicu ifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqne cuggftrfgrthhtvghrnhepiefhfeevkeehhfejgefhheejkeefhfejkedugeejtdejfedt ieffvdeifeevfeeinecuffhomhgrihhnpegvgihtvghrnhgrlhhsrdhiohenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghr fhhivghlughtvggthhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtph houhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 42D69700065; Mon, 28 Jul 2025 11:27:37 -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: Tb80fc6db3b9f9229 Date: Mon, 28 Jul 2025 10:27:16 -0500 To: "php internals" Message-ID: <67c55236-268b-47d3-9873-dec4732876b5@app.fastmail.com> In-Reply-To: References: <73a35675dff31a1eaf76b67af567194e@bastelstu.be> Subject: Re: [PHP-DEV] [DISCUSSION] User-land Throwable Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Mon, Jul 28, 2025, at 6:48 AM, Rokas =C5=A0leinius wrote: > | real-world example of a use-case you want to enable > > Say I am implementing a job runner, I do its error handling, and I wan= t=20 > to enrich the caught exception with additional helpful data for=20 > debugging. In this process I create a custom exception=20 > MyJobHandlerException, but the trace of the new exception includes my=20 > handler code, which the end user does not care about. I wish to=20 > overwrite the trace of the new MyJobHandlerException instance with the=20 > trace from the originally caught exception, but I cannot. > > I was always sure that the reason behind all methods of \Exception=20 > being final is Larry-Garfield-blogpost length/depth so I never bothere= d=20 > to ask and made workarounds. Hey, I resemble that remark! :-P (I actually have no idea what the original reason was for making so much= of Exceptions final.) I'm not sure if this would cover what you're talking about, but I did st= art a discussion about lightweight exceptions a few months ago. I didn'= t go anywhere:=20 https://externals.io/message/127188 --Larry Garfield