Re: Getting the real file and line from pear errors
| From: | Dan Rossi | Date: | Mon, 09 May 2005 04:10:18 +0000 |
| Subject: | Re: Getting the real file and line from pear errors | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19123@lists.php.net to get a copy of this message | ||
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 ?