[mod_python] Exception handling

Graham Dumpleton graham.dumpleton at gmail.com
Wed Oct 1 20:52:34 EDT 2008


Since all HTTP request interaction with your application is funnelled
through the handler, just wrap the entry point there in a try/except
block.

Do note that mod_python already does this, albeit that errors are sent
to Apache error log and only ever to browser if PythonDebug is On.

Graham

On 02/10/2008, Tiago Becker <tiagobecker at gmail.com> wrote:
> Hello!
>
> Is there a way to capture errors globaly with mod_python?
> I saw the sys.excepthook =
> pyHedExceptions.exceptionHandler, but like that i wont have
> the request object to write something to the
> user to warn about the error...
>
> Thanks!
>
>
> Tiago Becker
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>


More information about the Mod_python mailing list