Determining where a function is called from..

From: Date: Fri, 15 Aug 2003 14:02:24 +0000
Subject: Determining where a function is called from..
Groups: php.general 
Request: Send a blank email to php-general+get-159688@lists.php.net to get a copy of this message
Howdy Fellas, I've got this problem .. not really a problem but still some thing to my disliking. For a project I wrote some database handling class, no big deal. When a function from this module is called with a query containing an error, or some other error occurs inside this class it reports to my that an error occured inside that class. "Line blabla of class.database.inc.php". But what I really want to know is on what line the $Database->select() or such was called so that I can effectively trace the error. So, for effective error reporting I would like to know if there are functions or constants containing - the script-name a user-function is called from - the linenumber of this script a user-function is called from - And maybe it would even be doable to get an entire stack-trace of files and lines and functions to the point an error (or any other thing I would like to trace to) occurrs. Thanks, Wouter ps. or do I want too much now?

« previous php.general (#159688) next »