#12256 [Opn->Bgs]: Error tracking:pass the line number of the function call instead of fun.defin
| From: | pollita@php.net | Date: | Tue, 22 Apr 2003 05:01:13 +0000 |
| Subject: | #12256 [Opn->Bgs]: Error tracking:pass the line number of the function call instead of fun.defin | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38034@lists.php.net to get a copy of this message | ||
ID: 12256
Updated by: pollita@php.net
Reported By: sivasubraj at lycosmail dot com
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
PHP Version: 4.0.6
New Comment:
See the manual page for: debug_backtrace()
Previous Comments:
------------------------------------------------------------------------
[2001-07-19 10:57:16] sivasubraj at lycosmail dot com
<?php
class numberHandler
{
function numberHandler ()
{
}
function divide_by ($num, $div)
{
// prova a rifiutare parametri incorretti
// this will cause an Error in case $div is zero
return $num/$div;
}
};
// Some code
$n = new numberHandler();
print $n->divide_by(4,2) . "\n"; // ok
print $n->divide_by(4,0) . "\n"; // Here's the error
print numberHandler::divide_by(10,5) . "\n";
/*
A "Division by zero on line 13" error will be reported with the line
number from the inner of the class and there's no way of tracking the
real originator of the error.
How to make it possible to track the origin of the error, like in Java
?
Siva
Author: vincent
Date: 2001-07-19 05:05:49
Ask the PHP boys to make their product give proper line numbers.\
The same happens when you give an incorrect number of parameters for a
function. The linenumber will indicate the function definition instead
of the line where you do the function call.
*/
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=12256&edit=1