Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77850 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56659 invoked from network); 10 Oct 2014 12:31:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2014 12:31:17 -0000 Authentication-Results: pb1.pair.com header.from=bof@bof.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bof@bof.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain bof.de designates 80.242.145.70 as permitted sender) X-PHP-List-Original-Sender: bof@bof.de X-Host-Fingerprint: 80.242.145.70 mars.intermailgate.com Received: from [80.242.145.70] ([80.242.145.70:56890] helo=mars.intermailgate.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/15-29144-391D7345 for ; Fri, 10 Oct 2014 08:31:16 -0400 Received: (qmail 6788 invoked by uid 1009); 10 Oct 2014 14:31:11 +0200 Received: from 209.85.216.177 by mars (envelope-from , uid 89) with qmail-scanner-1.25-st-qms (clamdscan: 0.96.2/19491. spamassassin: 3.3.1. perlscan: 1.25-st-qms. Clear:RC:1(209.85.216.177):. Processed in 0.098691 secs); 10 Oct 2014 12:31:11 -0000 X-Antivirus-MYDOMAIN-Mail-From: bof@bof.de via mars X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:1(209.85.216.177):. Processed in 0.098691 secs Process 6782) Received: from mail-qc0-f177.google.com (gmail@bof.de@209.85.216.177) by mars.intermailgate.com with RC4-SHA encrypted SMTP; 10 Oct 2014 14:31:11 +0200 Received: by mail-qc0-f177.google.com with SMTP id c9so1772798qcz.22 for ; Fri, 10 Oct 2014 05:31:09 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.224.66.7 with SMTP id l7mr8176243qai.71.1412944269218; Fri, 10 Oct 2014 05:31:09 -0700 (PDT) Received: by 10.140.43.68 with HTTP; Fri, 10 Oct 2014 05:31:09 -0700 (PDT) Received: by 10.140.43.68 with HTTP; Fri, 10 Oct 2014 05:31:09 -0700 (PDT) In-Reply-To: References: <543320AB.4070606@sugarcrm.com> Date: Fri, 10 Oct 2014 14:31:09 +0200 Message-ID: To: Nikita Popov Cc: internals , Stas Malyshev Content-Type: multipart/alternative; boundary=001a11c22b0241228f050510b97e Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine From: bof@bof.de (Patrick Schaaf) --001a11c22b0241228f050510b97e Content-Type: text/plain; charset=UTF-8 Looking at the list of fatal errors Nikita classified as not suitable for converting to exceptions, I'd like to take exception : ) with two of them: I would love to be able to catch, at toplevel. with an error handler or otherwise, both the memory limits exceeded and time limit exceeded cases. These two safeguards, by themselves, are not instabilities, right? The limits could be set a bit higher and everything would continue normally, right? What I would like to see, is that I can configure an "extra allowance" for both of these limits, in php.ini - if that extra allowance is configured, and the normal limit is reached, generate a recoverable / catchable error and/or exception, and extend the respective limit (once) by the extra allowance. So, in practise, I would allow 2 more seconds, and 10 MB more memory, for use in a global handler that gives nicer error message, backtrace, non-white-http-500-response, or similar reaction. best regards Patrick --001a11c22b0241228f050510b97e--