Skip to content

Commit 96c7701

Browse files
author
whitequark
committedAug 8, 2015
Add column marker to ARTIQ exception traceback.
1 parent 27d2390 commit 96c7701

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

Diff for: ‎artiq/language/core.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Core ARTIQ extensions to the Python language.
33
"""
44

5-
import linecache
5+
import linecache, re
66
from collections import namedtuple
77
from functools import wraps
88

@@ -320,5 +320,6 @@ def __str__(self):
320320
function=self.function))
321321
line = linecache.getline(self.filename, self.line)
322322
lines.append(" {}".format(line.strip() if line else "<unknown>"))
323+
lines.append(" {}^".format(" " * (self.column - re.search(r"^\s+", line).end())))
323324

324325
return "\n".join(lines)

0 commit comments

Comments
 (0)
Please sign in to comment.