Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110316 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13532 invoked from network); 30 May 2020 19:15:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 May 2020 19:15:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B71D71804C2 for ; Sat, 30 May 2020 10:56:25 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 30 May 2020 10:56:25 -0700 (PDT) Received: by mail-vs1-f47.google.com with SMTP id k3so3363737vsg.2 for ; Sat, 30 May 2020 10:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UAJCiHqdwP88r0JOVssm3DfMSizjesZY7BWey1sixRs=; b=pf/6kX18Ql3GAwGGaBryf7eRbnH/RdZqSBYRxbtD6O5tFK+FmZB3oPNlJeTZozJeS0 iEcOnRuI09PTarA2KniSQS2UJ57z6SEV0fpobiEYVZTjWQfy/uBAe7Md9ANs6jWzis+H mgFwWC1C1m32kmE9b2FJZCH/renx8tPJXKcLar4/bSwNWq/4gditJ6ndpMs2JsK81BV9 soxzYE4J4u7+V10sunmpbpfSdE+pCJ1yFUJQfViInck8g2bb3vPvYGvgPoYjXCrwSVLo EXiVVmk7EcvD8loJ3bvLsf7mD4AwLHnGEUtvwfoR6zitnCay3wxFypsjXyHUx0DsAMDZ kLkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UAJCiHqdwP88r0JOVssm3DfMSizjesZY7BWey1sixRs=; b=Fe/tzBdYvJ+ibyBND0mp3XyhgLjxkkx5V8jfpJa309uWiqKM+rUEBr9yYPQlaKN9F8 y6xo82yBqAW5JJNKQ2W9xnWHCUeLbE+1yKVDApNeEvOxAOIZd4TTpEULeio6WCtNbse5 zzjLFUOz8VplHTym6T18RUBrLN8x1VvkGO7M4pbkE+HCj7Plw7xLbx5ttJuNUQZVoZTX Jm8/MWNBvI7RVhURQtKL/eGvoTt1XtA/71IjQr3ynZcOao2LEsdKn4ogxJYda9KyDr2/ oKZB52AkbKo7/LvEQqNJhG/GWG8R36goKMJXi6+lm031ls0yE2P49x28QRgNFUr1017W /6yw== X-Gm-Message-State: AOAM532P8BcnV1tc3nfq7x0ehnfMZXhq6RO4cPjHyfAJELYab69S8hEN H0AHdgooTEjeyre7QeWZWUDwbzXWnUPoYmzXLzWy7w== X-Google-Smtp-Source: ABdhPJwV2NJiFLAXDvvxqAjqEdP4lTi2uO5fLAaCt5jfnaHzn+vUcxaoTzrY9Wt9yCeh9x+xaPzfy8CCtKoyNduuI88= X-Received: by 2002:a67:2504:: with SMTP id l4mr9399494vsl.228.1590861381988; Sat, 30 May 2020 10:56:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 30 May 2020 18:56:11 +0100 Message-ID: To: Katie Volz Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Error Exceptions mode From: Danack@basereality.com (Dan Ackroyd) On Fri, 22 May 2020 at 17:09, Katie Volz wrote: > > Hello internals, > > I want to start a discussion on an RFC to add a declare() statement to > convert all errors triggered within a file to exceptions. > Hi Katie/Iggy, I'm not sure this is the right thing to do. Having internal code just throw generic ErrorExceptions does not get PHP to a place where it is possible for users to listen for individual error types, which I think is the biggest problem with the current situation. I won't duplicate my message from another thread, but I think there is an alternative path: https://news-web.php.net/php.internals/110315 > The error handler cannot be set in library code without affecting other libraries We could also just make the default error handler convert all errors/warnings to exceptions.....I've been doing that for my error handlers for years, and I believe it's the right thing to do for 95%+ of applications. Though it does require some use of the silence operator, which apparently some people find disconcerting. cheers Dan Ack