Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87461 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8484 invoked from network); 31 Jul 2015 21:36:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jul 2015 21:36:55 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.181 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.160.181 mail-yk0-f181.google.com Received: from [209.85.160.181] ([209.85.160.181:36602] helo=mail-yk0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/83-24609-57AEBB55 for ; Fri, 31 Jul 2015 17:36:53 -0400 Received: by ykay190 with SMTP id y190so69611156yka.3 for ; Fri, 31 Jul 2015 14:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=59/o+hex3TqH8Hw/umWbP0nKWVOCr1mTgrr/wybflTo=; b=CPXtOdnSuwUfujF8qHRuYpuCa9QJB+DgRzTROje+9AAeDwMfN2OYYbLqCpHUbm7hF8 Q6xcEZdVpi9Z+4JePLv9SkOjBBQIp8VzBt9vYYdggTXGIkTbrhiW+Fe6acJAlPVcIPem mKCoBQEF0lBo/XTH72mF8uebnkuG7Hnty7OSSS3L96qbCeoIXNHl6jeGEJZepAzGQBYj m6b7QaaMz/dBxNrINP11rDV4t7USGsZvBg/oWh3Ofuuv8eeNOEMid9sWDk5u5vKShlyq amIn3rt7MPYRn2/jvGgQ0h7vHkIQDw0UxFZjUWzo67qw+HQRcfdXcjhBv+1Zl9Rvr8JS MiLQ== X-Received: by 10.170.215.69 with SMTP id h66mr6067773ykf.74.1438378610218; Fri, 31 Jul 2015 14:36:50 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.129.40.77 with HTTP; Fri, 31 Jul 2015 14:36:10 -0700 (PDT) In-Reply-To: References: <836BA21C-AE99-4E7B-AB06-EBC30E41BA0E@icicle.io> <0AD335F5-35F3-4D98-8F82-800A1EDF8FD8@icicle.io> <05f101d0c838$fcdab5e0$f69021a0$@belski.net> <55B63FDF.6050100@gmail.com> <55B66494.1020106@gmail.com> <55B6707A.3040405@gmail.com> Date: Sat, 1 Aug 2015 06:36:10 +0900 X-Google-Sender-Auth: kwxXBilIbwMl2Le8SGYryk3LfhA Message-ID: To: Niklas Keller Cc: Scott Arciszewski , Rowan Collins , Anthony Ferrara , PHP Internals Content-Type: multipart/alternative; boundary=001a113bcfa01d5d0c051c329e82 Subject: Re: [PHP-DEV] Core functions throwing exceptions in PHP7 From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a113bcfa01d5d0c051c329e82 Content-Type: text/plain; charset=UTF-8 Hi Niklas, On Fri, Jul 31, 2015 at 7:20 PM, Niklas Keller wrote: > Using set_error_handler isn't handling errors gracefully. Well, it's > better than E_ERROR, but then libraries can't handle those errors > gracefully, because the user might override its error handler by setting an > own handler. Now I see what do you mean by "gracefully". TL;DR; It's app developer jobs to handle these fatal errors. Most fatal errors shouldn't be recovered by library. e.g. Fallback to non CSPRNG when CSPRNG is not available. IMO, library authors do not have to worry about errors like session's E_RECOVERABLE_ERROR or CSPRNG not available. These are fatal errors by its nature and app developer or system administrator job to handle them. We cannot blindly assume such fatal errors never happen in production apps, so we are better to give users a chance to return "Nice error page/message" when it happened. Anyway, we are better to move errors to exceptions at once and force "all" modules including 3rd party module to raise exceptions. i.e. Make php_error_docref() raise exceptions. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a113bcfa01d5d0c051c329e82--