Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120287 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 77026 invoked from network); 15 May 2023 16:02:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 May 2023 16:02:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B3AF2180503 for ; Mon, 15 May 2023 09:02:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 15 May 2023 09:02:28 -0700 (PDT) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-24ded4b33d7so8695120a91.3 for ; Mon, 15 May 2023 09:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684166548; x=1686758548; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lEGUW6calSA84+CKxndmdRQ5Gjhb6Bg0nu9Kuyuf/fE=; b=mnx/CsbpwnBKSxZcXVRTBXcoln0v9DToNUyjJ7DrehF5F1kp0rgXyFzRI6huO1oPvk 1YcxVmX6PQkMtYpMJ8AS65Uj1qwLha2FPihMWoVwpfKvC9yDrQBuzwPdAwt/koaAq2Qm Kai3LQFZegfd7ly8Y2dUzz+lEakGEcr4gTDYyVSKssWLZQwEnnrB/SwBwnuNPxXyVFq+ KGfPeG5ZrUed/q/NT45xzTORf9n6NBzfTGyh1qlWessWQNgiHSwW8fJoQf5ALCQMrozr ILiHZd4SD76G3B6XnB9OLmsmNI/fmRZws7wl4SMSNNjoYHhwxkGNTfTJXun+rTzmyY5v 1CHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684166548; x=1686758548; h=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=lEGUW6calSA84+CKxndmdRQ5Gjhb6Bg0nu9Kuyuf/fE=; b=I9V1l5JOwTI+sb1dWzrr2XEUbxK+OVhuOpDrMLrM1eZy3dVJSRD78ZqVgZNFXK6rmi 5PGQg2g+bRUgFyopalQSuW1JWLCGbCv6YgNUlujBe4OeP68OvKVTInMizJADnihgf/Z9 STAeavZd8t8OVNV3U3s3Mztas1Gz75sffTl1B9zZyR2+Hp9EzvDRSl8qA1upsnbLEOLU 6UW16qUChR+30LGvzhXLMh1Y6T5zrum8ky7bxvN4xYdl9En/aJqmMkgwY0vRHFPzOMp2 +Mn5NafTDBMuqZkbZZ85DD4CtF08BVU0tSUFJxnJww97iaFa4WEA1HnES3B2gU04RNhw 9kyQ== X-Gm-Message-State: AC+VfDyni/BBsuuHIonX46hM25/ir5MKsjzUtx0/H4IBpU/WSCeEAraH Uh4fPPr58cAV/+bDHwL473Oh4bhIB93QEMSw8cW2mZKk+x0= X-Google-Smtp-Source: ACHHUZ6vrBI/icR5GXSLr0LMPrw36ufvipkIakBYwXXrPmR2MFUIj+iPK7xG9ijCqmHHlpdgvBaI6R9hiMzSsu+QVq8= X-Received: by 2002:a17:90b:4c49:b0:24e:1b19:867f with SMTP id np9-20020a17090b4c4900b0024e1b19867fmr33957399pjb.37.1684166547631; Mon, 15 May 2023 09:02:27 -0700 (PDT) MIME-Version: 1.0 References: <20230509000325.76dad6a7@platypus> In-Reply-To: Date: Mon, 15 May 2023 17:02:16 +0100 Message-ID: To: someniatko Cc: BohwaZ , PHP internals list Content-Type: multipart/alternative; boundary="000000000000d073b005fbbd9497" Subject: Re: [PHP-DEV] [VOTE] Use exceptions by default in SQLite3 extension From: george.banyard@gmail.com ("G. P. B.") --000000000000d073b005fbbd9497 Content-Type: text/plain; charset="UTF-8" On Mon, 15 May 2023 at 15:41, someniatko wrote: > The `PDOException` class is actually extending the `RuntimeException`, > not just `Exception`. > Yes, and this is, IMHO, a mistake. Outside SPL, there are only 4 extensions which extend from RuntimeException: - PDO - MySQLi - SNMP - Phar See: https://heap.space/search?project=php-src&full=&defs=&refs=spl_ce_RuntimeException&path=&hist=&type= The vast majority of extensions that define their own custom exceptions extend Exceptions. The reason being that depending on a separate extension (here SPL) instead of core API is less than ideal. Moreover, SPL exceptions are meant for userland. And I personally find it extremely strange that if I attempt to catch a RuntimeException I might as well catch a PDO failure. Best regards, George P. Banyard --000000000000d073b005fbbd9497--