Hello,
I have a very odd situation.
mod_wsgi 3.3 on RHEL 5 x86_64
If I raise an exception in an html-generating function, it is caught just
fine by my WSGI framework with a try/except block.
If I raise the exact same exception within a plain function called from the
same place, it causes a 500 internal server error: mod_wsgi (pid=17007):
Exception occurred processing WSGI script
'/home/jason/Code/WhiteBoot4/DevLevel.2/TMTManage/WSGI/Dashboard.wsgi'
I can place an explicit try/except around that exact spot, and it is
completely skipped. It's really bizarre. Any ideas?
Here is a simple example. Note that I have actually reproduced it with
this level of simplicity.
def FunctionCalledByWSGIFile():
try:
RenderHTML()
except Exception as e:
# output error here
...
def RenderHTML():
...
# This way works fine
raise Exception("foo")
...
# This way causes 500 internal server error
data = Select()
def Select():
raise Exception("foo")
Thanks!
Jason Garber
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.