ID:               21515
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Feature/Change Request
 Operating System: all
 PHP Version:      4.3.0
 New Comment:

You can use debug_backtrace() for this (which is new in PHP 4.3.0).
(Try var_dump(debug_backtrace()); to see what output it gives), marking
this bug as a doc problem, as debug_backtrace() has not been documented
yet.

Derick


Previous Comments:
------------------------------------------------------------------------

[2003-01-08 04:20:36] [EMAIL PROTECTED]

Is it possible to create a getCurrentFunctionName() function?

If an user defined error occured (for example: you are not getting a
valid SQL-resultset with your query) in a function, it would be handy
to show the functionname where the error is generated.

Possible example:


function getQueryResultSet() {
 // requested code
 $currentFunctionName = getCurrentFunctionName();
 $query="select * from table";
 $result = mysql_query($query) or die ("The error occured in ".
$currentFunctionName);
 return $result;
}

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21515&edit=1

Reply via email to