Add debug logging of exceptions that happen during rending of studio_view or student_view in Studio
This commit is contained in:
@@ -105,6 +105,7 @@ def xblock_handler(request, tag=None, course_id=None, branch=None, version_guid=
|
||||
# dungeon and surface as uneditable, unsaveable, and undeletable
|
||||
# component-goblins.
|
||||
except Exception as exc: # pylint: disable=W0703
|
||||
log.debug("Unable to render studio_view for %r", component, exc_info=True)
|
||||
content = render_to_string('html_error.html', {'message': str(exc)})
|
||||
|
||||
return render_to_response('component.html', {
|
||||
|
||||
@@ -159,5 +159,6 @@ def get_preview_html(request, descriptor):
|
||||
try:
|
||||
content = module.render("student_view").content
|
||||
except Exception as exc: # pylint: disable=W0703
|
||||
log.debug("Unable to render student_view for %r", module, exc_info=True)
|
||||
content = render_to_string('html_error.html', {'message': str(exc)})
|
||||
return content
|
||||
|
||||
Reference in New Issue
Block a user