Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81355 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13516 invoked from network); 29 Jan 2015 07:48:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2015 07:48:07 -0000 Authentication-Results: pb1.pair.com header.from=mails@thomasbley.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mails@thomasbley.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain thomasbley.de from 85.13.137.24 cause and error) X-PHP-List-Original-Sender: mails@thomasbley.de X-Host-Fingerprint: 85.13.137.24 dd15934.kasserver.com Received: from [85.13.137.24] ([85.13.137.24:40896] helo=dd15934.kasserver.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/90-09212-5B5E9C45 for ; Thu, 29 Jan 2015 02:48:06 -0500 Received: from dd15934.kasserver.com (dd0803.kasserver.com [85.13.146.34]) by dd15934.kasserver.com (Postfix) with ESMTPSA id 49F7C261376; Thu, 29 Jan 2015 08:48:02 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-SenderIP: 95.90.236.210 User-Agent: ALL-INKL Webmail 2.11 In-Reply-To: References: <20150127024521.3689F2618FD@dd15934.kasserver.com> <5363C355-EE27-485F-9C27-C36F79B3FA37@ajf.me> <20150128173609.5B1BC261376@dd15934.kasserver.com> To: ajf@ajf.me, yohgaki@ohgaki.net Cc: internals@lists.php.net, nicolas.grekas+php@gmail.com, reeze@php.net Message-ID: <20150129074802.49F7C261376@dd15934.kasserver.com> Date: Thu, 29 Jan 2015 08:48:02 +0100 (CET) Subject: Re: [PHP-DEV][RFC] Enable error_handler callback parameters to be passed by reference From: mails@thomasbley.de ("Thomas Bley") > User defined error handler is for error handling customization, letting > user > customize message makes sense. This is exactly our case. > Thomas, > If there are many people concerns to change error message, how about > append user error message to original error message when it's changed? > It's a hacky behavior to me, though. I see no difference if the userland developer can extend (or even change) error messages if he can completely disable (using @, return true in the callback, etc.). Of course it is our task to inform about best practices in the php manual and warn about bad things. Regards Thomas Yasuo Ohgaki wrote on 29.01.2015 03:51: > Hi Andrea, > > On Thu, Jan 29, 2015 at 2:38 AM, Andrea Faulds wrote: > >> Error handlers are global anyway, so this is useless (or dangerous) for >> libraries. > > > I suggest library/framework developers *not* to use user defined error > handler. > It's better to leave error handler for application developers. > > I strongly suggest application developers to use user defined error handler > to catch > unexpected problems. > > If app codes are written not to raise errors under normal operations (which > I strongly > recommend to do so), errors are sign of system problems. e.g. Subsystem is > down, > misconfiguration, crackers are attacking system, etc. > > In case of attack, admins would like to know which account is causing the > problem. Error message like "Warning: failed to write /etc/passwd" is less > useful than "Warning: failed to write /etc/passwd. User: yohgaki". > > User defined error handler is for error handling customization, letting > user > customize message makes sense. > > Thomas, > If there are many people concerns to change error message, how about > append user error message to original error message when it's changed? > It's a hacky behavior to me, though. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net >