Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127212 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 qa.php.net (Postfix) with ESMTPS id 50FAD1ADB48 for ; Sun, 27 Apr 2025 20:57:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1745787336; bh=j1tkSkDnm/FQAwGrBshk+DaOwWRKdoExJ8UJzzGfI3U=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=YClR3r6LsYbJV5KAhgQyrczSnmZfuX2vvlGXLG0n2r/umXF9GKu00l1ADAD6rYtx7 Ro/1Yvj1g1qe/WGThH0DQziAYGNicCE5j0+TY/Xx6dhM/DOd6iK8LxrZyK72xP0Q1E tJh+WgwTVDMPC7qBsuKBnWNJFsDnXo/vXOQAzE5sX1v+MH0TbNu8S8+Tzh3NForzRG sMNJbSP7PQi4Fpy5RgGFCci2PGkDF9mW2BxL8aCvoPMgFEbhun/Sraicj/JMWrSU0e yP/nzgIss9AXIj8NvY+7jFeZGd7c8a9N0VI5zY9nexI6Tg1PMq0KVhblPU98kV2P0E iwigTmx8nrCzA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5E8E61804C9 for ; Sun, 27 Apr 2025 20:55:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) (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 ; Sun, 27 Apr 2025 20:55:32 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 5423C1140195; Sun, 27 Apr 2025 16:57:49 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-05.internal (MEProxy); Sun, 27 Apr 2025 16:57:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:cc: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=fm1; t=1745787469; x= 1745873869; bh=j1tkSkDnm/FQAwGrBshk+DaOwWRKdoExJ8UJzzGfI3U=; b=Q 5uW5t9nAbONrkjBMGXO7p75a2sKgIsH3uZQSABzRYL0eyf7lNNRihbU3oldvRP44 uWeJKLbFLsbAGflBXnlw0bhPb5cnyiTFzNw/plZyZEzKU1rFkLGjnbYq5q/hYnRo uWg+kZPy21EhG+46XnkwrmDVmqqN3aIG2IggjXmMEugr2ubMVDvGnVJxlC2n3gwB ur+6un3iTcSlrVIrwTfXOqXqcGSvqq2uI9IdLkWrXECmTRmJsoHrClee6JN67kAD F79CgptKvRlSEkeAco5C0IQTuqhUY/ZVBz36mfPA3hMo9C81gPHUycSSJnCYYQfy IWoX7+OzGKEgC0gvhTlgg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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= 1745787469; x=1745873869; bh=j1tkSkDnm/FQAwGrBshk+DaOwWRKdoExJ8U JzzGfI3U=; b=CsP8yAXaGbQehsJYsVH2Q/nH9g8MteNIM+C4J1VggWGP+pYJ/Ag xdA+quG0KZ2f9CoRLOavwj6N4NwS+arKNJ7dkKh+5qJlxSFNPkc5RMblfFZHfRPq SOPOxVv1Y79YSaDwWxwBCd6L9qRCl5OcAxqdVnHWTez4h+W3RMczbUUNS+J2X4Kb wpvzP8MlgBd7wy60nwA+/sqWT7YfYP1nhFGlxGQDtNlyoFRpFhhJmmgS0MZpviPk hgU0ubIp5hk2vOECthkjTy100FSzb77jEkQclK8T8h7w+6E23MkomTtlBeZg5RzW /akpsmuWuxSVRFuNZT7mHMgyTWaZHAklZXQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheeltdekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgesrgdtreerredt jeenucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcuoehrohgssegsohhtthhlvggurd gtohguvghsqeenucggtffrrghtthgvrhhnpeeiueethedvvdefjefhgfeiheelheehtdfh feekjefflefgvedvkeduteejjedttdenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehrohgssegsohhtthhlvggurdgtohguvghspdhnsggprhgt phhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehtihhmsegsrghsth gvlhhsthhurdgsvgdprhgtphhtthhopehtvghkihgvlhgrvdegieesghhmrghilhdrtgho mhdprhgtphhtthhopehinhhtvghrnhgrlhhssehgphgsrdhmohgvpdhrtghpthhtohepih hnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id BC567780069; Sun, 27 Apr 2025 16:57:48 -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: T9b3e54caf69b4bad Date: Sun, 27 Apr 2025 22:57:28 +0200 To: "Kamil Tekiela" , =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: "PHP internals" , "Gina P. Banyard" Message-ID: <7726be4d-eda4-4df4-a99b-f4e2ad1f8076@app.fastmail.com> In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC] Throwable Hierarchy Policy for Extensions Content-Type: multipart/alternative; boundary=bf495ae2aa9f4d3f94cc63bbabd8a017 From: rob@bottled.codes ("Rob Landers") --bf495ae2aa9f4d3f94cc63bbabd8a017 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sun, Apr 27, 2025, at 22:40, Kamil Tekiela wrote: > >The exception message MUST NOT be the only property that allows to > differentiate different types of error that the user may be interested= in. >=20 > What does this mean exactly? Can you give an example? >=20 Many people don=E2=80=99t know about the $previous property, which allow= s you to chain exceptions, for example. I=E2=80=99ve worked in more than= one codebase with custom exceptions that are missing that. It makes for= throwing from a catch more nebulous as you lose how you got there in th= e first place.=20 =E2=80=94 Rob --bf495ae2aa9f4d3f94cc63bbabd8a017 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On Sun, Apr 27, 2025, at 22:40, Kamil Tekiela wrote:
>The exceptio= n message MUST NOT be the only property that allows to
differe= ntiate different types of error that the user may be interested in.

What does this mean exactly? Can you give an exampl= e?


Many people don=E2= =80=99t know about the $previous property, which allows you to chain exc= eptions, for example. I=E2=80=99ve worked in more than one codebase with= custom exceptions that are missing that. It makes for throwing from a c= atch more nebulous as you lose how you got there in the first place.&nbs= p;

=E2=80=94 Rob
--bf495ae2aa9f4d3f94cc63bbabd8a017--