summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaheshgudi2017-11-10 16:50:54 +0530
committermaheshgudi2017-11-10 16:50:54 +0530
commit95f862caee8ca6077ee8f9a8fc88d9ca44db1cdf (patch)
tree80fb17501e7995ed3abb34ac3b0d62dd8decc560
parent4d5e801efff62ee63538e3c787ab74e6503e3d74 (diff)
downloadonline_test-95f862caee8ca6077ee8f9a8fc88d9ca44db1cdf.tar.gz
online_test-95f862caee8ca6077ee8f9a8fc88d9ca44db1cdf.tar.bz2
online_test-95f862caee8ca6077ee8f9a8fc88d9ca44db1cdf.zip
Remove traceback for recursion and/or runtime errors.
-rw-r--r--yaksh/error_messages.py3
-rw-r--r--yaksh/grader.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/yaksh/error_messages.py b/yaksh/error_messages.py
index 77bb1c9..7ea8618 100644
--- a/yaksh/error_messages.py
+++ b/yaksh/error_messages.py
@@ -9,8 +9,9 @@ def prettify_exceptions(exception, message, traceback=None, testcase=None):
"traceback": traceback,
"message": message
}
- if traceback and traceback.count('\n') > 6:
+ if exception == 'RuntimeError' or exception == 'RecursionError':
err["traceback"] = None
+
if exception == 'AssertionError':
value = ("Expected answer from the"
+ " test case did not match the output")
diff --git a/yaksh/grader.py b/yaksh/grader.py
index 4b4c892..38cce8d 100644
--- a/yaksh/grader.py
+++ b/yaksh/grader.py
@@ -159,9 +159,6 @@ class Grader(object):
self.timeout_msg
)
)
- except OSError:
- msg = traceback.format_exc(limit=0)
- error.append("Error: {0}".format(msg))
except Exception:
exc_type, exc_value, exc_tb = sys.exc_info()
tb_list = traceback.format_exception(exc_type, exc_value, exc_tb)