I'm cleaning up / refactoring a bunch of stuff in my BigModPerlProject that will hopefully go public w/an alpha phase next week ( side note - thanks to everyone here for helping me out over the past few months )

During this phase, I've been causing a lot of general errors that case Server Errors with my perl handler
ie:
[Thu Jan 26 01:26:18 2006] [error] [client 127.0.0.1] Undefined subroutine called at [Thu Jan 26 01:26:19 2006] [error] [client 127.0.0.1] Can't locate object method

etc etc etc (the stuff you hate to see , because it means you missed renaming something)

is there any way to trap these errors so that I can

        a - more efficiently issue a dbi rollback
on spec, it happens when the same child gets a new request or i restart, but i'd like to rollback on the request fail so i'm currently using a cleanup handler which checks my DB class to see if the current instantiation of the DB writer handle is in a transaction. that works fine, but at the risk of screaming 'too much optimization', if there's some internal var that i can access in the cleanup that i can check to see if this check / reset is necessary or not (ie, if there was a request death / error ), that would make me happy, as its probably better than my transaction checking attempt.

        b - print some sort of other page
                ideally:
in development - print whatever line that was getting sent to errorlog from that
                                is this possible?  if so, how?  i can't find 
anything on it.
                        in production - redirect to either a custom page or an 
error page
                                i was just going to use a custom error 
directive in httpd.conf
                                but if there is a better way, i'm all ears

again, thanks to everyone on the list for putting up with me over the past few months - esp stas, phillip and perrin



Reply via email to