#19236 [Com]: Need $php_errorLineNumber $php_errorScript in addition to $php_errormsg
| From: | jason_priebe at yahoo dot com | Date: | Tue, 25 Apr 2006 13:10:02 +0000 |
| Subject: | #19236 [Com]: Need $php_errorLineNumber $php_errorScript in addition to $php_errormsg | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96216@lists.php.net to get a copy of this message | ||
ID: 19236
Comment by: jason_priebe at yahoo dot com
Reported By: php-bugs at ketan dot org
Status: Open
Bug Type: Feature/Change Request
Operating System: FreeBSD
PHP Version: 4.2.2
New Comment:
I get the point of an error_handler, but this doesn't help
when you're eval-ing code that contains a parse error.
The parse error doesn't trigger the error_handler.
$php_errormsg contains the actual error string, but doesn't
tell you what line of the eval-ed code contained the error.
The httpd error log contains the offending line number, but
AFAICT, I can't get to it inside my PHP code.
Previous Comments:
------------------------------------------------------------------------
[2002-09-04 18:13:35] php-bugs at ketan dot org
It is half done the way it is now. If we have $php_errormsg, then we
should have the other components of the standard php error, the line
number and the script name. An error message in isolation is not very
useful.
------------------------------------------------------------------------
[2002-09-04 17:11:50] wez@php.net
That's too much magic; you can do this yourself using
set_error_handler and having your error handler set up
these global vars yourself.
------------------------------------------------------------------------
[2002-09-04 16:49:35] php-bugs at ketan dot org
When using ini configuration directive track_errors = On, $php_errormsg
contains the last error message. We need a corresponding variable
$php_errorLineNumber (or whatever) that keeps track of where in the
file the error occurred, and $php_errorScriptName to tell in which file
the error occurred (in case of include()).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19236&edit=1