Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127253 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 272291A00BC for ; Wed, 30 Apr 2025 13:35:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1746020000; bh=HEW8XcVI8yvtuFkfri7h9PiLcUQw7Sdy6hrwSTZuZV4=; h=Date:From:To:In-Reply-To:References:Subject:From; b=edEtBwxJ0Ue+y+crkYUKPKbGcZqE6va8AXiHlYUj5PBZNkswErp5ziIufEyd52qc2 fMb/P60rDZX1SgjIscqvpRsU7nLKEF0UtA/f5Nch0X8s4ys4SvI01bG3z+D71ZC7yL ZwhzpOyCCY7NX45j3puRNJFZuMdh3grdK3C+QCfPCwzxp6WRLo2i85VIRqHX6rEv1j x+7IvA3fkh9ttnjNGo9zNNCsR99ZGTmS7qBfSzZ9YkLn8REFQ6FhXUpZ8s8rplEKqB t/gPiNyfm7pl4PILDGBRcQiiGKvXdEH/4K2yPtlx8xYRlwLIMC/hLL2yM+nosXA6+K rlPO27xtAKDXQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3CB4D180055 for ; Wed, 30 Apr 2025 13:33:19 +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,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE 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 fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) (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 ; Wed, 30 Apr 2025 13:33:18 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id C1FCD1140281 for ; Wed, 30 Apr 2025 09:35:34 -0400 (EDT) Received: from phl-imap-06 ([10.202.2.83]) by phl-compute-10.internal (MEProxy); Wed, 30 Apr 2025 09:35:34 -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=1746020134; x=1746106534; bh=/ZeChX2+CfZOkKrmhqWTG vfyX/cckXOU260dUsN4bGs=; b=DfKG0Wu/afSYRfSJg3ZLPtsoszk5zhWFgAA0R pycaNg15Tka8mRU6ltBUKxXCqznA8VmEb9BWR/ei5FKuNvL5ClGTHDe/fdiu2Gy3 mfp2x82u0Y+Vci7fTDy4Lvwy025SIaz9PH5C74KK7oE7g40M4JkTNlqkinl4WS1C ESpPnOA9hcUnhD4PUWaUN1alDCFtWATdIEtJ/EDnxAuCjmYsAPd5kPDNGBgeah/z Xmf8HD93HhTqvtne9Ggf+5UueIaumpBWkeHeOfGeA4bq3MCLgJYZD0ZKaJzG91Sd 3BM7vLa8UlqSb2LrBkij5lB+ih7PmM9aktuBfQwOVDZvmD0BQ== 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=1746020134; x=1746106534; bh=/ ZeChX2+CfZOkKrmhqWTGvfyX/cckXOU260dUsN4bGs=; b=kuoOOSkj1IXHvvVkg zFLLJRHDlPFh8LakLj3rqqazi0JucVnAo7PNFZe8tTlKrRbp7BAPwuQD9kLeIQ9K VRGjBC30nO6GEtrEkC3EhMG9+AjzQp3wfpLRAuoz4QLI6cUU/5YVYHWwBxWb8uhg bVJCGYeBjtSamnmvOf3wa4UlDOLXSV3kIEFDIV4FREA0pnrcjgQlwxId6QBXid5b UruTdGNJvwoyl+BE5SJrjNy1pZyo0nwHcmZ++Hw7e2FSK10VoRxDpxsjKOrxD3h1 vXQBcleGrR+h928bK1Ibta4qBxalhcgr8fv65cHijKkGtVy3dS8lBzrx1qNw/x8a pdTUg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvieeikeefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthhqredtredt jeenucfhrhhomhepfdfnrghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrh hfihgvlhguthgvtghhrdgtohhmqeenucggtffrrghtthgvrhhnpeffieeivdfhvdeguddt tdegteeiueegvefhteehfeeffeetudeitdehtdegjeeuieenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlught vggthhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 6720129C0072; Wed, 30 Apr 2025 09:35:34 -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: T3339c68d3b5f96f0 Date: Wed, 30 Apr 2025 08:33:44 -0500 To: "php internals" Message-ID: In-Reply-To: <4233b00a-7593-e70d-f235-da650cd7bac6@php.net> References: <4233b00a-7593-e70d-f235-da650cd7bac6@php.net> Subject: Re: [PHP-DEV] [RFC] Throwable Hierarchy Policy for Extensions Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Wed, Apr 30, 2025, at 6:18 AM, Derick Rethans wrote: > On Sun, 27 Apr 2025, Tim D=C3=BCsterhus wrote: > - Any two exceptions with different causes MUST be identifiable either=20 > by a unique exception class name, a stable ``$code``, or a=20 > class-specific additional property suitable for programmatic=20 > consumption (e.g. an enum). > > I would probably not even allow the stable ``$code`` in here, as I hav= e=20 > seen from experience people don't really check for them. The only time I've seen anyone use $code is in TYPO3. Their coding stan= dards say that any time you throw an exception, you use the current time= stamp (determined manually) as a code. That way there is a globally uni= que code regardless of exception type that can be grepped to find the ex= act line it came from. I am not saying this is a good strategy, just that it's the only time I'= ve seen $code used in the wild... --Larry Garfield