Modify ↓
#921 closed enhancement (wontfix)
Using cgitb module to help in debugging.
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | web frontend/mod_python | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
While using the mod_python front end I'm getting database lock errors (soon to be the subject of another ticket). I was getting 500 errors from apache. It was helpful for me to add a cgitb handler.
Index: trac/ModPythonHandler.py =================================================================== --- trac/ModPythonHandler.py (revision 1049) +++ trac/ModPythonHandler.py (working copy) @@ -178,7 +178,17 @@ env_cache_lock.release() return env +import cgitb + def handler(req): + try: + handler2(req) + except: + req.content_type = 'text/html' + cgitb.Hook(file = req).handle() + return apache.OK + +def handler2(req): mpr = ModPythonRequest(req) mpr.init_request()
Now I can see the error in my browser, rather than tailing the error.log for apache. Perhaps this would be useful for other users debugging an install.
Attachments (0)
Change History (2)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
Resolution: | → wontfix |
---|---|
Severity: | normal → enhancement |
Status: | new → closed |
We already have the send_pretty_error
feature. I don't see enough value of addings cgitb on top, especially as it would need to be added to every frontend.
Note:
See TracTickets
for help on using tickets.
The locking problem turned out to be that I had sqlite 0.4.2 installed. I discovered this while trying to write a ticket for the problem I was having. Once I upgrade to sqlite 1.0 the problem appears to have gone away.