Parent _LINE_ Request
| From: | Richard Thomas | Date: | Thu, 15 Aug 2002 10:15:29 +0000 |
| Subject: | Parent _LINE_ Request | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-86857@lists.php.net to get a copy of this message | ||
I have a set of universal DB wrappers that I use for most of my
projects. The great thing about these wrappers, they auto manage your
connection so connecting to 2 dbs on a single server only require 1 DB
connection, Keeps track of what DB belongs to what class call and auto
switches DB's within the functions..
However the extra layer of complication has made troubleshooting of
events alot harder. When ever there is a error it refers to the line
within my dblib.php Making it extremely difficult to track the issue
down in the main script..
What I suggest is a new variable called PARENT_LINE_ which would be
pretty much the same as _LINE_ but clearly would show the _LINE_ of the
calling script...It would be extremely easy to create this value any
time a require/include or similiar function was called and assign a
value, then close that value when the require/include is done..
You could then add to the error statements a if PARENT_LINE_ echo VALUE
With the increased complexity of PHP, and use of library/modular
approach to programming such a tool would be invaluable..
I would do it myself but im a PHP god and don't know C from a hole in my
rear ;)