Re: Display line-numbers of funktion calls?

From: Date: Fri, 11 Apr 2003 22:45:17 +0000
Subject: Re: Display line-numbers of funktion calls?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-143585@lists.php.net to get a copy of this message
Many times people pass in the __LINE__ and __FILE__ to their error handling function which yes can be a little tedious but it's how it is. Something like:
I agree, but that doesn't solve his problem. IINM he wants to know what file and line *called* the function which is now giving him an error. The only way to get this information is with a callstack dump (like the one provided by debug_backtrace()) It's like if your applications use the PEAR DB library, and an error happens there, but you're logging your errors instead of displaying them. You'd like to know what piece of code called the PEAR library, rather than just knowing that line 297 of DB/pgsql.php had an error. All sorts of code may have reason to call the method around 297, but which one passed something in that caused an error? This has plagued PHP developers since the beginning of time, and is ameliorated in PHP 4.3... finally! P.

« previous php.general (#143585) next »