Skip to content

Commit

Permalink
Improve an error message, see #1279
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhalter committed Feb 16, 2019
1 parent cc0c4cc commit 2f86f54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jedi/api/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ def tokenize_without_endmarker(code):
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):
Expand Down

0 comments on commit 2f86f54

Please sign in to comment.