ID: 21515
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Closed
+Status: Open
-Bug Type: Feature/Change Request
+Bug Type: Documentation problem
Operating System: all
PHP Version: 4.3.0
New Comment:
hah, nu even de daad by het woord voegen :-)
Previous Comments:
------------------------------------------------------------------------
[2003-01-08 04:26:25] [EMAIL PROTECTED]
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
------------------------------------------------------------------------
[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
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php