Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#921 closed enhancement (wontfix)

Using cgitb module to help in debugging.

Reported by: mcarpenter@… 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 mcarpenter@…, 19 years ago

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.

comment:2 by Christopher Lenz, 19 years ago

Resolution: wontfix
Severity: normalenhancement
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.