[Gas] Re: debugging question

Sigfried Gold sigfried at onthejob.net
Tue Jun 5 18:37:28 CDT 2001


if you'll notice the error messages:

   [Tue Jun  5 15:51:55 2001] (Ox1GZYCuz80AAGBqt0Y) eon.cgi: Uncaught Gas
   Exception: DBD::Pg::db selectrow_array failed: ERROR:  attribute
   'evaluationform_id' not found
   Gas::ErrorManager::handle_exception('Gas::ErrorManager=HASH(0x8498014)',
   'DBD::Pg::db selectrow_array failed: ERROR:  attribute \'evaluati...') called
   at /home/sgold/public_html/cgi-bin/eon.cgi line 89

i get one error from DBD and a line number from eon.cgi, where the uncaught
error handler is called.  it seems that if the uncaught error handler did
a full stack trace instead of just reporting where it was called from, we'd
see the more relevant line that spawned the error.

some of the error handling code seems to do full stack traces -- it may
just be that uncaught errors don't get that treatment for some reason.

it's been a while since i did this, but you can user caller() to get the
entire stack.

sigfried

* Zachary C. Miller <wolfgang at wolfgang.groogroo.com> :
> > Perhaps some caller() output or Carp::cluck()/Carp::confess() output would 
> > help with a stacktrace?  cluck() might be best because it's what ch1XenZz
> > d0!!!1
> 
> I'm not sure that will help except if it is inserted at the point
> where the die happens which in this case is in the DBI code. So we'd
> have to fork off our own version of DBI.  (actually I guess they are
> warn's not die's). 
> 
> I guess maybe we could do something tricky with a __WARN__ handler, or
> even better just override the warn method (which I guess is what Carp
> does...we just have to make sure it is properly overridden in the
> scope of the DBI module. I'll look into this too.
> 
> -- 
> Zachary C. Miller - @= - http://wolfgang.groogroo.com/
> IMSA 1995 - UIUC 2000 - Just Another Leftist Muppet - Ya Basta!
>  Social Justice, Community, Nonviolence, Decentralization, Feminism,
>  Sustainability, Responsibility, Diversity, Democracy, Ecology
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Gas mailing list
> Gas at lists.groogroo.com
> http://lists.groogroo.com/cgi-bin/listinfo/gas




More information about the Gas mailing list