Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127197 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 9D5A41A00BC for ; Sun, 27 Apr 2025 12:23:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1745756488; bh=mOpCpYFkXUgGk5DcU6t7jJ9ZzhRCv1B319uy6GgfYcw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=gBGcpxwxtaqApQY5F79RvS7KNjOHGy93wiMInjBeLMde5oOWyT8y8VAAjklBN+FJW wMEftkUzIvAxe1FnzjTpxeD80KjYrhu1YRtfXtfupxp2+tnOgwWona+ciqEMvUjE68 KgY85l2cRG6LTX47D/NDBmpA/nidjN9K6gftRU8K5eZ+S7I2kcswL9a3wsNKcLY2lx LRNHLV3r3MaJoApjIbn9W6ACnMXfV79/iipdcS44c/VdNqmp3W4uYk703PdTuyCJ1W KhbQSjZiHOkpXYD4Hto6fppjP+0ofW8DymuGxYhcMfWURJm14y+wHcTjFfVgHgHMAP spVdv4wEuKI1A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EF4EA180053 for ; Sun, 27 Apr 2025 12:21:27 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,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-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 12:21:27 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-43edecbfb94so36762425e9.1 for ; Sun, 27 Apr 2025 05:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745756624; x=1746361424; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=1KjEYMwTY9e3bbP+ScbfRPTmyU+379RIa9q0jGfYcDs=; b=k8mNzJVewTdu82GcRQua65dkRhK6+FkcQtc9M0qZ7vc/7aOwMWtHIu6wmwPBe9+Tzy MRc/faQHMa/wO4/leGlttReMpmNN8peYEiBLBU1BBYnkTNaKVyDCbJC8dZIZqjN+fYs9 jS5dmofSldZ0N9YcEOSDK7fTPvngAyQ54NeUxgvXtPNp9l9YjTRLTjnyfSWyLl0vCeT0 Lh4bEY/FtZpAEZ+Kx9y5DYjROoROFH4ZMZdoNq8lwgQyFY/hvZ8cahlinNADbVWaMsz5 r4bkeMUUd1ry7OrCSnsSZWlrZrumBpTfe6MA4irLJmP4N3GvmX/wbUEi5KnGy2oUZ5xI hgIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745756624; x=1746361424; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1KjEYMwTY9e3bbP+ScbfRPTmyU+379RIa9q0jGfYcDs=; b=fJppoJugtd4qdsEWrIIUZMxMHhIndMAY6e09d8h1RqUR6lSAvg8V6+wm82dtqGARF1 HsVgH7I5Xj1ikdTeEDM/fP/QhLiPOPCvJjjUyraVKLPqk0ZZn1WnvRo3ehNdWEhCuw+M H7BsubAgAxo9amwFxLo95sFYAfCdHskUijVx+eJVqa3KuvWEV8Qspqb6jNOf5JDaEzE/ q4N9crULvVrBhxzKX7OOpAojOsHZe45Y6CLbDq0mQzoGpGIaRCu5XIFrwSC01gvkNWA2 esCB0JIxLHpgNfKQdJ4kJX6mxkJgHsiCUIQaYXf/eqWmin3GkD+BFdc7RkE1eRTlBJhs 2aHw== X-Gm-Message-State: AOJu0YyC33C+OeuTfhNx69sDNDKPooBdIp7NvyCkjskWS+nFy4gECOsT I6L+/8SLZ9DTY+byq7kYiU/gL7XfH2MzDAARuglCNcYxPByRW5IlXtKrPA== X-Gm-Gg: ASbGncu4UoQqYoigN6GrMyqzjTqlieELWeapqvqz9XkBYpWCpRXDHWNJ/8osEFIWmJE sIYum5mbi8sKD+sTjwToWxbrsS3KqXlfbdy0aJQKk7nb1A/4wfhf0MzD3Jm8nePUU7tx71kA6gJ cCoK4KobjjFF6VVLy791/oVq5Efx1zBTZSltKcea9Lebu8PED5OUllXi66kwWHxkcQB28DMqCBJ /JxC8BrnGrwlsA1q7mJ44/2HrbxA0FtIlBlUyKWk24wZvQUtbkYZGeV3l/uOuUzrkroHG/LoyqU CaAIk+xy/rinI4KprrBBmpIn5EeNOhA4BAtwNBizljbTren37PRfPwnNVTXCeU+40OGiQTyTtwr lPdzCGzeKEg== X-Google-Smtp-Source: AGHT+IER7BbjSKNPhU9uFihDKfrynxEqlACOYrLAU5kwB3SQ8Vfuj09Bxlhoc8VF5yZa7zKPza7I4g== X-Received: by 2002:a05:600c:a186:b0:43d:160:cd9e with SMTP id 5b1f17b1804b1-440a660b48dmr57903225e9.17.1745756623855; Sun, 27 Apr 2025 05:23:43 -0700 (PDT) Received: from [192.168.0.241] (178-119-85-231.access.telenet.be. [178.119.85.231]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a073ca5467sm8093377f8f.28.2025.04.27.05.23.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Apr 2025 05:23:43 -0700 (PDT) Message-ID: <7bc87f46-7d5a-4848-b505-a77499281f45@gmail.com> Date: Sun, 27 Apr 2025 14:26:07 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Concept: Lightweight error channels To: internals@lists.php.net References: <39597a9c-6854-40c6-a529-32b2b178cb27@app.fastmail.com> Content-Language: en-US In-Reply-To: <39597a9c-6854-40c6-a529-32b2b178cb27@app.fastmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit From: dossche.niels@gmail.com (Niels Dossche) On 26/04/2025 09:17, Larry Garfield wrote: > * Exceptions are very expensive, the hierarchy is confusing, and handling them properly is a major pain. Failing to handle them properly is very easy since you have no way of knowing what exceptions the code you're calling might throw, or its nested calls, etc. That makes them poorly suited for mundane, predictable error conditions. I get the point of having checked exceptions, and I suppose it would be nice. Hierarchy: I don't think the hierarchy is that confusing, can you elaborate? Regarding performance however, rather than introducing yet another completely new concept to do almost the same thing, why not try to improve exception performance instead? I just opened a PR that makes instantiating exceptions much much faster, and this is only after like 15 mins of work. I'm sure there's even more to gain. Kind regards Niels