From 16e8d4b3c096e6034c0066adffc8f5a520f272c7 Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Thu, 26 Oct 2017 18:34:36 +0530 Subject: Beautiful error outputs --- yaksh/templates/exam.html | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index 9596c1c..7b6d54e 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -88,17 +88,31 @@
Testcase No. {{ forloop.counter }}
- {% if not error.expected_output %} + {% if not error.type %}
 {{error|safe}} 
- {% else %} - {% if error.given_input %} - - - - - + {% elif error.type == 'assertion' %} + We tried the calling your function with the following test case:
+
{{error.test_case}}
+
For given Input value(s):{{error.given_input}}
+ But the following error took place: + + + + + + -
Exception Name{{error.exception}} +
Exception Message{{error.message}}
+ + {% elif error.type == 'stdio' %} + {% if error.given_input %} + + + + + + +
For given Input value(s):{{error.given_input}}
{% endif %} -- cgit