[mod_python] Catching errors above handler level?

Bart scarfboy at gmail.com
Fri Apr 6 10:54:45 EDT 2007


I would like to know whether there's a way to work above
the level of handlers, since I'm thinking about making
a singular error handler that says things like "Oops,
the database acted up" without having to add
the same try-except-except-except-except to all of my
two dozen or so handlers.

If possible, it may be interesting in other ways, such as making a
nice exception formatter too, like moimoin's (if memory serves).


I also wonder whether it's simple to add automatic me-notification of
things like HTTP 404 and 500 errors as well as python exceptions.

Can at least the HTTP error bit be done by falling through to a
python/php errordocument page?
Can it be done Inside mod_python? (which would have the possible
upside of being able to  report context variables too, but I can live
without that)


thanks for having your brains picked,
--Bart


More information about the Mod_python mailing list