ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pear-general
pear-general
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved