Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67363 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14352 invoked from network); 7 May 2013 20:38:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2013 20:38:15 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.75 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.75 smtp75.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.75] ([108.166.43.75:45254] helo=smtp75.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/98-06696-73669815 for ; Tue, 07 May 2013 16:38:15 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id A46C81E80FA; Tue, 7 May 2013 16:38:12 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp2.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 478551E80E6; Tue, 7 May 2013 16:38:12 -0400 (EDT) Message-ID: <51896633.7000206@sugarcrm.com> Date: Tue, 07 May 2013 13:38:11 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Thomas Anderson CC: PHP internals References: <51896088.4070907@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] idea: letting the line number and file name be set via user_error From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > So the error messages your library produces have the same consistent > look and feel to them that PHP's errors do? While it may be nice, I don't think it is worth changing the PHP API for. Error messages have very defined api, which has the place in the source where they were actually produced. > Besides, keeping in mind the KISS "keep it simple stupid" principal > gratuitous information should probably be hidden away. I mean if it's > not going to help anyone then the only thing left for it to do is > potentially confuse people. And why risk that? The place where the error is produced is definitely helpful. Now, it may not be *all* the information you need, but error messages are simple things, they are not meant to replace debugger with full backtrace and stack inspection. I don't think it needs added complications just to have some library messages look a little nicer. In any case, one can install custom error handler which would format messages for user errors differently, if desired. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227