Script: improve ValueError for column

Ref: https://github.com/davidhalter/jedi/issues/1168
This commit is contained in:
Daniel Hahler
2018-07-10 15:58:20 +02:00
committed by Dave Halter
parent d06e55aab5
commit f3c1f4c548

View File

@@ -133,7 +133,9 @@ class Script(object):
column = line_len if column is None else column column = line_len if column is None else column
if not (0 <= column <= line_len): if not (0 <= column <= line_len):
raise ValueError('`column` parameter is not in a valid range.') raise ValueError('`column` parameter (%d) is not in a valid range '
'(0-%d) for line %d (%r).' % (
column, line_len, line, line_string))
self._pos = line, column self._pos = line, column
self._path = path self._path = path