Commit 1b25433a by Victor Shnayder

Allow error-template-rendering errors to propagate to top-level 500 handler

* hopefully won't come up, but if they do, our 500 page
  should be better than  HttpResponse("There was an unrecoverable error")
parent 44ee0200
...@@ -187,7 +187,10 @@ def index(request, course_id, chapter=None, section=None, ...@@ -187,7 +187,10 @@ def index(request, course_id, chapter=None, section=None,
{'staff_access': staff_access, {'staff_access': staff_access,
'course' : course}) 'course' : course})
except: except:
result = HttpResponse("There was an unrecoverable error") # Let the exception propagate, relying on global config to at
# at least return a nice error message
log.exception("Error while rendering courseware-error page")
raise
return result return result
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment