[mod_python] Grabbing the callback object

Conrad Steenberg conrad at hep.caltech.edu
Fri Nov 8 14:20:56 EST 2002


On Fri, 2002-11-08 at 14:06, Wyant, Jaime wrote:
> 
> Maybe I could create a wrapper handler for the publisher handler?
> 
> # my wrapper
> 
> import mod_python.publisher
> 
> def handler( req ):
>   try:
>     return mod_python.publisher.handler( req )    
>   except Exception:
>     req.write( create_cool_html_error_report() )
>     return apache.OK
> 

Yes, for the publisher handler, that sounds rather more sensible. 

Cheers!

Conrad

> 
> >>>On Fri, 2002-11-08 at 12:16, Wyant, Jaime wrote:
> >>>> Hi all!
> >>>> 
> >>>> Is there any way to grab the Callback object?  I really 
> >>>want to override the
> >>>> "ReportError" method and generate a more meaningful error 
> >>>message with
> >>>> pretty graphics.
> >>>> 
> >>>> Better yet, is there a way to catch unhandled exceptions 
> >>>and display a
> >>>> custom error message? 
> >>>> 
> >>>> thanks!
> >>>> 
> >>>> jaime wyant (jwyant at sfbcic . com)
> >>>> MS Farm Bureau
> >>>> (601) 977 - 4291
> >>>> 
> >>>> 





More information about the Mod_python mailing list