summaryrefslogtreecommitdiff
path: root/yaksh/grader.py
diff options
context:
space:
mode:
authormaheshgudi2018-07-04 16:34:56 +0530
committermaheshgudi2018-07-12 18:27:27 +0530
commit99f0c944fafec51b9327fe5dea01096842788e03 (patch)
treeec3586b1fca3f48c97bb24b131451677bea7a856 /yaksh/grader.py
parenta850749942d163f9aedb19a1d19c4b8d7016745d (diff)
downloadonline_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/grader.py')
-rw-r--r--yaksh/grader.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/yaksh/grader.py b/yaksh/grader.py
index 320e7e7..de8f897 100644
--- a/yaksh/grader.py
+++ b/yaksh/grader.py
@@ -23,6 +23,13 @@ class TimeoutException(Exception):
pass
+class CompilationError(Exception):
+ pass
+
+
+class TestCaseError(Exception):
+ pass
+
@contextlib.contextmanager
def change_dir(path):
cur_dir = abspath(dirname(MY_DIR))