Re: [PEAR] Getting the real file and line from pear errors
by Justin Patrin other posts by this author
May 8 2005 11:38PM messages near this date
Re: [PEAR] Issue with DataObject FormBuilder and DO's from other DB's
|
Re: [PEAR] Getting the real file and line from pear errors
On 5/8/05, Dan Rossi <pear@[...].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
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Justin Patrin
Dan Rossi
|