Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127258 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 12F9B1A00BC for ; Wed, 30 Apr 2025 20:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1746046476; bh=hZaNF/LU8w42/UvE6Xh12/Z8k/1e5gJGaZDpHM9dPrA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZyFneECBo+9rlHnS+EgqFKtJwAkBuOUGEnvrrbBQOjILpoHQ2tcxW6qpuZsziOwNb 52cwVm21aFeKziegX603vWG3qcQnT6Tlf6hAxBVerNvz38IpxXZyt5pnBEDQD7byb/ D5qd7WnGmvqkBHLsHVomjUe5Ky0u9qjN6cVWtpDbHXWx65wACtlrfAV+PZ9UG6paw5 82ZJCdGrzhD2dNgtK8sk83okQK8IhEuYeVvb5mjosCTqvqXr0/Rkqb0vaO4Pjc9eQs lkzvHX3uub6IT0MX8N/KNmv6s6dyEfTmbBa6fbRRLGlZnpwk7dPmbOAFFKsmyTFB5L 6cXzOtd+qrMig== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A7B04180068 for ; Wed, 30 Apr 2025 20:54:35 +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=0.1 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 20:54:35 +0000 (UTC) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-54998f865b8so354580e87.3 for ; Wed, 30 Apr 2025 13:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746046610; x=1746651410; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=92jsqPAvWRIVewn24F928btcKA7vInoKCTOYrGBiGd8=; b=RLVp0wZWj/z8G+E+H6GyEnLUdfV7gL9achDOdHH22vPnFNngdrAN+UGVKw7zRQm+yk NpddZBHbvEAJbVrjk+toGuJG+azf7HhyREtjYq/gyZIlDDzZiHVBxglm+Y2LGL82JYHu lV0qJyDK6UfXhauOUp+I154uCSwW5WdZJNyiCP4nCfOM27S3+F4E1f11CXNOUvhd9LlI z48jZqPGikP5dyulv8mhQ1nxMjHyOPx4AVgGxVp28IeOZ80o6PNLit+K49LWHZAb2a4b 2+1jRILlPyO5BoOupCqmdbZQnGJv6TH0lAPlblKIV5hWpcawrLYKNvudxDSoivIjuC6V xPrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746046610; x=1746651410; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=92jsqPAvWRIVewn24F928btcKA7vInoKCTOYrGBiGd8=; b=HrY6jfGewDJaCXa2ahpaXH0g77KdrEY+Zim+f7cHUVUt9olDiHOlbKhXtzKc+ao8KA zCQdTalKo5hlroMWbaWKqiB0TN4an+g4KtEVqwWcwdKzBLBNhfM4px/3iJiUJtyCZEVU t5oV5K2P3VqFXhuee/J8ADmsS29EUkGSTAlDqPyWbaQKbnsEbBETq0COoxvqet7xq1h9 z6GzSIUXs2xflgihCe6vP2eenGtxff/GkeNjrjz9tjap6pQpEB8QYEHqSHhI2cDSJC9/ qRlMGpDLiGICuhqjifKNgzkf+N1O9wXa/hRpTkbNwgbYX6L7+jv7i/yGqZBIfr6xNcd1 SYIg== X-Gm-Message-State: AOJu0YwuSe5YR5dE7uuyD9+TDW4VAW6VOB5LNW+lMEv9GX55sALnuEwf DsMHAWXj2/cYf+xrsk92JBAcQrewwkbFkhQ2UDpqiXeUOxPoyul7LHjrLf7hI8rKlcHOqORN3Co YFtMgZoYBqL3J8SHG9ILZi96VYd2l2Nt1 X-Gm-Gg: ASbGncv7N/VaExv+gt07i5gChKsL+3vy7XLH00Yy73xOY7bEVLVo+uopjCDvWtj3rjE ckyccErbfcTvytlAL+2Et9R4FgLNbvgtEDfhC7NcL80JY6rZjaQgEm3yVx4Ww41jV0n8c1lqdrm PTex5Wv+7MYFsW7E/PEvoXzQ== X-Google-Smtp-Source: AGHT+IEEtgllA0yPIkWwPnGSnAax8OfQ7EtnjhvWez9HjywZKfG8GDbK9Ik0PXhmjLux4C/inuwaBCHja3s2CvR1/48= X-Received: by 2002:a05:6512:3091:b0:54e:8fbb:8f0 with SMTP id 2adb3069b0e04-54ea72648fbmr109529e87.1.1746046609827; Wed, 30 Apr 2025 13:56:49 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <4233b00a-7593-e70d-f235-da650cd7bac6@php.net> <36830fef-1594-4b19-8833-62aeb6a36389@app.fastmail.com> In-Reply-To: <36830fef-1594-4b19-8833-62aeb6a36389@app.fastmail.com> Date: Wed, 30 Apr 2025 21:56:38 +0100 X-Gm-Features: ATxdqUE36a11x-LV7hhz1DfYuR_GKQ9yD9IxcAEfC59CdLgzyuy0pCJxLpsDe4s Message-ID: Subject: Re: [PHP-DEV] [RFC] Throwable Hierarchy Policy for Extensions To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: tekiela246@gmail.com (Kamil Tekiela) On Wed, 30 Apr 2025 at 21:13, Larry Garfield wrote= : > >> [=E2=80=A6] just that it's the only time I've seen $code used in the w= ild... > >> > > > > PDO (for better or worse) also uses the `$code` for the error code > > returned by the database. Unfortunately it also widens the (untyped) > > $code from int to string|int, which causes some issues, since folks onl= y > > expect int, since Exception::__construct() types the `$code` parameter > > as `int`. > > > > Best regards > > Tim D=C3=BCsterhus > > In my experience, worse. But that's another topic. PDO is a bad example because the code is pretty much useless. You need to get the actual code from `errorInfo[1]` if you want to know the reason.