Improve an error message, see #1279

This commit is contained in:
Dave Halter
2019-02-16 04:31:52 +01:00
parent cc0c4cc308
commit 2f86f549f5

View File

@@ -130,7 +130,10 @@ def get_stack_at_position(grammar, code_lines, module_node, pos):
p.parse(tokens=tokenize_without_endmarker(code))
except EndMarkerReached:
return p.stack
raise SystemError("This really shouldn't happen. There's a bug in Jedi.")
raise SystemError(
"This really shouldn't happen. There's a bug in Jedi:\n%s"
% list(tokenize_without_endmarker(code))
)
def evaluate_goto_definition(evaluator, context, leaf):