Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81351 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90744 invoked from network); 29 Jan 2015 02:52:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2015 02:52:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.51 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.51 mail-qg0-f51.google.com Received: from [209.85.192.51] ([209.85.192.51:41923] helo=mail-qg0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/31-17992-660A9C45 for ; Wed, 28 Jan 2015 21:52:23 -0500 Received: by mail-qg0-f51.google.com with SMTP id z107so22852608qgd.10 for ; Wed, 28 Jan 2015 18:52:19 -0800 (PST) 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=Xuk76j7rrWcm+UVUy5VKIZCk/ZTTp6u7ZP7IEinelms=; b=tqxXwa+y51GdFozv1vTjM57WCmspdjTAZHqAPrqZJSHNrR+zxx7ynL62PdCeqEhv56 I7JvUXfSiBz/qgYXe48vpJa2yZD1DjfGldf02LggzxQg9kAsCqfGJ+aWzDu3ILl+uXLb hIWBkmUOPj2sAsbdTvBuZuNnG1m+4/o/C1DPSZNgoiI56MzkzVNs2V4MiTeNGE2xLn6o jo6SAoQWo2+z+xnKosaL7CT+UxR7W0VZhBK5CBQyB8pIYZEfYXUTTcc8zCjupPK1B0sp EcMPOxLRbjUFJNOI4zcTy4tAVpcXUEbxLWn4NIaYesIg5MCiI9D6mfAbZV/K+NCuEHLr 0Qpg== X-Received: by 10.224.28.198 with SMTP id n6mr20011424qac.15.1422499939713; Wed, 28 Jan 2015 18:52:19 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.93.70 with HTTP; Wed, 28 Jan 2015 18:51:39 -0800 (PST) In-Reply-To: References: <20150127024521.3689F2618FD@dd15934.kasserver.com> <5363C355-EE27-485F-9C27-C36F79B3FA37@ajf.me> <20150128173609.5B1BC261376@dd15934.kasserver.com> Date: Thu, 29 Jan 2015 11:51:39 +0900 X-Google-Sender-Auth: WiPPPC4E1IdF5FHL5cIFGDi7owo Message-ID: To: Andrea Faulds Cc: Thomas Bley , "internals@lists.php.net" , "nicolas.grekas+php" , reeze Content-Type: multipart/alternative; boundary=001a11c2cc9a998838050dc19373 Subject: Re: [PHP-DEV][RFC] Enable error_handler callback parameters to be passed by reference From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c2cc9a998838050dc19373 Content-Type: text/plain; charset=UTF-8 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 --001a11c2cc9a998838050dc19373--