diff options
author | maheshgudi | 2018-07-04 16:34:56 +0530 |
---|---|---|
committer | maheshgudi | 2018-07-12 18:27:27 +0530 |
commit | 99f0c944fafec51b9327fe5dea01096842788e03 (patch) | |
tree | ec3586b1fca3f48c97bb24b131451677bea7a856 /yaksh/error_messages.py | |
parent | a850749942d163f9aedb19a1d19c4b8d7016745d (diff) | |
download | online_test-99f0c944fafec51b9327fe5dea01096842788e03.tar.gz online_test-99f0c944fafec51b9327fe5dea01096842788e03.tar.bz2 online_test-99f0c944fafec51b9327fe5dea01096842788e03.zip |
Raise appropriate exceptions for C and Java language to the Grader
- Raise AssertionError,CompilationError and TestCaseError for assertion, user answer compilation
and testcase compilation errors respectively.
- Add test case for C/C++ and Java
Diffstat (limited to 'yaksh/error_messages.py')
-rw-r--r-- | yaksh/error_messages.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yaksh/error_messages.py b/yaksh/error_messages.py index 512d664..86375bf 100644 --- a/yaksh/error_messages.py +++ b/yaksh/error_messages.py @@ -11,7 +11,10 @@ def prettify_exceptions(exception, message, traceback=None, "traceback": traceback, "message": message } - if exception == 'RuntimeError' or exception == 'RecursionError': + ignore_traceback = ['RuntimeError','RecursionError', + "CompilationError", "TestCaseError" + ] + if exception in ignore_traceback: err["traceback"] = None if exception == 'AssertionError': |