Commit 909aec43 by Piotr Mitros

Better error messages

parent e8c7e552
......@@ -137,10 +137,10 @@ class formularesponse(object):
student_answers[self.answer_id],
cs = self.case_sensitive)
except UndefinedVariable as uv:
raise StudentInputError('Undefined: '+uv.message)
raise StudentInputError(uv.message+" not permitted in answer")
except:
#traceback.print_exc()
raise StudentInputError("Syntax Error")
raise StudentInputError("Error in formula")
if math.isnan(student_result) or math.isinf(student_result):
return {self.answer_id:"incorrect"}
if not compare_with_tolerance(student_result, instructor_result, self.tolerance):
......
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