Add error in logging

This commit is contained in:
Awais Jibran
2019-10-31 09:46:55 +05:00
parent 6c0ede859e
commit cb2a24711e

View File

@@ -620,12 +620,13 @@ class CapaMixin(ScorableXBlockMixin, CapaFields):
html = warning
try:
html += self.lcp.get_html()
except Exception:
except Exception as error:
# Couldn't do it. Give up.
log.exception(
u"ProblemGetHtmlError: Unable to generate html from LoncapaProblem: !r, !r",
u"ProblemGetHtmlError: Unable to generate html from LoncapaProblem: %r, %r, %s",
problem_display_name,
problem_location
problem_location,
text_type(error)
)
raise