Re: Getting the real file and line from pear errors

From: Date: Mon, 09 May 2005 04:20:20 +0000
Subject: Re: Getting the real file and line from pear errors
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19125@lists.php.net to get a copy of this message
On 5/8/05, Dan Rossi <pear@electroteque.org> wrote: > > On 09/05/2005, at 1:34 PM, Justin Patrin wrote: > > > > Are you using trigger_error? This is really not what you're supposed > > to do... > > No no noway :) > > > 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. > > I am pushing the PEAR_Error into Error_Stack then handling it via the > error_stack callback. > > > > > > There is also a backtrace in the PEAR_Error (I think). If there isn't > > just call debug_backtrace(). > > > > -- > > > > It looks like the backtrace in pear is using debug_backtrace if i > vardump backtrace, its timing out on the screen i am sending the line > and file of the second key of backtrace ie $error->backtrace[1][file] , > which is getting the pear one, i wonder where the rest of the files are > ? > Well your full backtrace is probably too much for your machine to handle. Heavily OO calls make the backtrace very large. Try looping through the backtrace and just echoing the file / line / method keys. -- Justin Patrin

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