Re: Getting the real file and line from pear errors

From: Date: Mon, 09 May 2005 03:34:06 +0000
Subject: Re: Getting the real file and line from pear errors
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19120@lists.php.net to get a copy of this message
On 5/8/05, Dan Rossi <pear@electroteque.org> wrote: > I have still yet to tweak my custom pear error handler, as most the > time the line and file that it returns in /usr/lib/php/PEAR.php and the > line of the error method called. Is there a way to get a backtrace of > two files up, ie my interface class, which composes a pear package > which then triggers the pear errors, collecting the file and line from > the pear package and rather than Pear itself. Lemme know. > Are you using trigger_error? This is really not what you're supposed to do...it's better to use PEAR_Error objects. As long as you pu the right error message in your errors you should be able to know where the problem was. There is also a backtrace in the PEAR_Error (I think). If there isn't just call debug_backtrace(). -- Justin Patrin

« previous php.pear.general (#19120) next »