Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94260 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89004 invoked from network); 26 Jun 2016 11:09:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2016 11:09:45 -0000 Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.161.172 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.161.172 mail-yw0-f172.google.com Received: from [209.85.161.172] ([209.85.161.172:34751] helo=mail-yw0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/4B-00500-9F7BF675 for ; Sun, 26 Jun 2016 07:09:45 -0400 Received: by mail-yw0-f172.google.com with SMTP id i12so131649588ywa.1 for ; Sun, 26 Jun 2016 04:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=ZE/tO28yHagtWggu2yGwrZ9ZIMwgW8xKlliGx+CRMw4=; b=w0mERmWyOLP2MO3SQVkto77+GLi1hJXfz+zstK2ps+kb3v7xEJAFZNsm1Qvm5xlaCM L2XyoXbX+W7+GD2GM5K3nxNx7aGicOSaAf10CLFguKNjeIrp0vEBa/R89KdWhx2qRcGr BFDC8J5LHLtwhqPfXGnmFwaseooF4kfLuylaDQkdaYgBKih6IiWkIpQZNth+x9Wp9jZQ t/OaPVXdGEPyBBKPZWT6Dj25bMSpNIjZFtV6PKgq0VcUDY7qnALwy6WDzUrgUo40hATE 422zSS8lek7A3ut3GvwT2dwlJcmwxt+fMn4oFdiko3mPO62c7EWhLW045Mu0vGRWQaLS vX7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=ZE/tO28yHagtWggu2yGwrZ9ZIMwgW8xKlliGx+CRMw4=; b=lpCIuUqZBiyLYmKr/rgjGugDT+ZcxM4zCQHpgt8IsIk86ViGhGaLxxZ8C7q19ulasM uC7/DfnkTl6K9zzOVKUZ5K/f89XyT6NfoIQ2sqNNZUYN5Oo2CQg2Rw8M0LSz6MUooeSL G3phl3jBtUGQeQfBnrnw44OcWE2TgL4MfYGF6QD0TwjJcWimXPPU+dxVQBI8y7Zo1OBs msDovpvfGXO1QkWF/S2RGbX0OkUsivPFGNpHBOmWmE7fveHD7cKncAVk2RC+wax1TK+r bDKnE4NC3m37dOKAeUZEc3hFkO75Rc97cZGvRQTkfDMvzfpe7AoGucisB559swxKhRBL OVYQ== X-Gm-Message-State: ALyK8tJ96je2KyGGViAdo/rqadI1QXy0veljvrPckyCoWjNrQTClnacxvv6evdY3tWrqujManqtYxLE/bn48EA== X-Received: by 10.37.198.68 with SMTP id k65mr8326886ybf.164.1466939382672; Sun, 26 Jun 2016 04:09:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.207.139 with HTTP; Sun, 26 Jun 2016 04:09:42 -0700 (PDT) X-Originating-IP: [2.99.236.140] In-Reply-To: <151b8d23-39a8-376f-fefa-e48183826432@fleshgrinder.com> References: <2c547cd2-408d-238b-2b5c-e6f7f24f0e7a@fleshgrinder.com> <151b8d23-39a8-376f-fefa-e48183826432@fleshgrinder.com> Date: Sun, 26 Jun 2016 12:09:42 +0100 Message-ID: To: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC DISCUSSION] Error Storage Behavior From: danack@basereality.com (Dan Ackroyd) On 6/11/2016 5:48 PM, Fleshgrinder wrote: > Currently error_get_last() always contains the last error that occurred, > however, this is actually not desired if the last error was an exception > that was caught. Changing the behaviour of how errors are handled, to depend on what happens after the error occurs, seems a really bad choice to me. From https://bugs.php.net/bug.php?id=54043 > If you create a custom error handler which converts all PHP errors to exceptions, > catching internal exceptions inline therefore throws another Exception in the custom error handler, Can you provide a reproduce case for this? The code below has a custom error handler; it is never called. It's actually not that clear what problem you are trying to solve here. > Should we treat it as a simple bug fix? No, I don't think we can. First, wrong behaviour is a design flaw not a bug, and second it's really not obvious that having weird complex behaviour would be preferrable. On 26 June 2016 at 08:08, Fleshgrinder wrote: > Any feedback here? This month you've sent almost 4 emails a day to this list. That is an incredibly high number for a list that is distributed to thousands of people. This list would be much better served if there were fewer emails, that contained more fully thought through proposals. cheers Dan getMessage()); } echo 'END' . PHP_EOL; function shutdown() { $error = error_get_last(); var_dump('Error ', @$error); } function tierErrorHandler($errorNumber, $errorMessage, $errorFile, $errorLine) { echo "Is this called?" . PHP_EOL; $message = "Error: [$errorNumber] $errorMessage in file $errorFile on line $errorLine
\n"; throw new \Exception($message); }