Re: idea: letting the line number and file name be set via user_error

From: Date: Tue, 07 May 2013 20:38:11 +0000
Subject: Re: idea: letting the line number and file name be set via user_error
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
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


Thread (20 messages)

« previous php.internals (#67363) next »