summaryrefslogtreecommitdiff
path: root/yaksh/grader.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/grader.py')
-rw-r--r--yaksh/grader.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/grader.py b/yaksh/grader.py
index a721236..d81470b 100644
--- a/yaksh/grader.py
+++ b/yaksh/grader.py
@@ -148,14 +148,15 @@ class Grader(object):
error.append(
prettify_exceptions("TimeoutException", self.timeout_msg)
)
- except Exception:
+ except Exception as e:
exc_type, exc_value, exc_tb = sys.exc_info()
tb_list = traceback.format_exception(exc_type, exc_value, exc_tb)
+ line_no = e.lineno
if len(tb_list) > 2:
del tb_list[1:3]
error.append(
prettify_exceptions(
- exc_type.__name__, str(exc_value), "".join(tb_list)
+ exc_type.__name__, str(exc_value), "".join(tb_list), line_no=line_no
)
)
finally: