diff options
author | mahesh | 2017-10-27 02:22:08 +0530 |
---|---|---|
committer | maheshgudi | 2017-11-07 14:50:09 +0530 |
commit | 72b3d672735f624064431cbb0751d3cc3b08b6ba (patch) | |
tree | cd1ea7fa1c14a82813c973ff62fb9c1e067b3291 /yaksh/templates | |
parent | 16e8d4b3c096e6034c0066adffc8f5a520f272c7 (diff) | |
download | online_test-72b3d672735f624064431cbb0751d3cc3b08b6ba.tar.gz online_test-72b3d672735f624064431cbb0751d3cc3b08b6ba.tar.bz2 online_test-72b3d672735f624064431cbb0751d3cc3b08b6ba.zip |
Add traceback for exceptions
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/exam.html | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index 7b6d54e..8b573d4 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -91,17 +91,31 @@ {% if not error.type %} <pre><code> {{error|safe}} </code></pre> {% elif error.type == 'assertion' %} - We tried the calling your function with the following test case:<br/> - <pre><code><strong>{{error.test_case}}</strong></code></pre> - <table> - <tr> But the following error took place: </tr> - <tr> - <td>Exception Name</td> + {% if error.test_case %} + <table class="table table-bordered"> + <col width="30%"> + <tr class = "active"> + <td> We tried calling your function with the following test case:</td> + <td><code><strong>{{error.test_case}}</strong></code></td> + </tr> + </table> + {% endif %} + <p> <b>The following error took place: </b></p> + <table class="table table-bordered" width="100%"> + <col width="30%"> + <tr class = "active"> + <td><b>Exception Name: </b></td> <td><mark style="background-color:#ff9999;">{{error.exception}}</mark> </td> </tr> <tr> - <td>Exception Message</td><td>{{error.message}}</td> + <td><b>Exception Message: </b></td><td>{{error.message}}</td> + </tr> + <tr> + {% if error.traceback %} + <td><b>Full exception: </b></td> + <td><pre>{{error.traceback}}</pre></td> + {% endif %} </tr> </table> {% elif error.type == 'stdio' %} |