From 2f86f549f5ec908c996f09e351164192df7aead8 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 16 Feb 2019 04:31:52 +0100 Subject: [PATCH] Improve an error message, see #1279 --- jedi/api/helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jedi/api/helpers.py b/jedi/api/helpers.py index 2489cd9b7..7cf4bc6fc 100644 --- a/jedi/api/helpers.py +++ b/jedi/api/helpers.py @@ -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):