Commit 808bc659 by Tim Babych

Merge pull request #4151 from edx/i18n-dont-print-exception-msg-twice

Do not print exception message below stacktrace
parents 4477c285 ceb25fc4
......@@ -153,4 +153,5 @@ Muhammad Ammar <mammar@edx.org>
Abdallah Nassif <abdoosh00@gmail.com>
Johnny Brown <johnnybrown7@gmail.com>
Ben McMorran <bmcmorran@edx.org>
Mat Peterson <mpeterson@edx.org>
\ No newline at end of file
Mat Peterson <mpeterson@edx.org>
Tim Babych <tim.babych@gmail.com>
\ No newline at end of file
......@@ -221,7 +221,7 @@ class InputTypeBase(object):
self.status = state.get('status', 'unanswered')
try:
# Pre-parse and propcess all the declared requirements.
# Pre-parse and process all the declared requirements.
self.process_requirements()
# Call subclass "constructor" -- means they don't have to worry about calling
......
......@@ -249,7 +249,11 @@ class CapaMixin(CapaFields):
# e.g. in the CMS
msg = u'<p>{msg}</p>'.format(msg=cgi.escape(msg))
msg += u'<p><pre>{tb}</pre></p>'.format(
tb=cgi.escape(traceback.format_exc()))
# just the traceback, no message - it is already present above
tb=cgi.escape(
u''.join(['Traceback (most recent call last):\n'] +
traceback.format_tb(sys.exc_info()[2])))
)
# create a dummy problem with error message instead of failing
problem_text = (u'<problem><text><span class="inline-error">'
u'Problem {url} has an error:</span>{msg}</text></problem>'.format(
......
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