From 154b10fde0a0defcdbbc666ffe80c3a2184cbbfa Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 7 Aug 2012 14:07:57 +0200 Subject: [PATCH] diagnostics --- .../src/com/jetbrains/python/psi/impl/PyBaseElementImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/src/com/jetbrains/python/psi/impl/PyBaseElementImpl.java b/python/src/com/jetbrains/python/psi/impl/PyBaseElementImpl.java index b1767d0b2e0c..4bea56bffe8f 100644 --- a/python/src/com/jetbrains/python/psi/impl/PyBaseElementImpl.java +++ b/python/src/com/jetbrains/python/psi/impl/PyBaseElementImpl.java @@ -99,7 +99,7 @@ public class PyBaseElementImpl extends StubBasedPsiElemen protected T childToPsiNotNull(TokenSet filterSet, int index) { final PyElement child = childToPsi(filterSet, index); if (child == null) { - throw new RuntimeException("child must not be null"); + throw new RuntimeException("child must not be null: expression text " + getText()); } //noinspection unchecked return (T)child; @@ -109,7 +109,7 @@ public class PyBaseElementImpl extends StubBasedPsiElemen protected T childToPsiNotNull(IElementType elType) { final PyElement child = childToPsi(elType); if (child == null) { - throw new RuntimeException("child must not be null"); + throw new RuntimeException("child must not be null; expression text " + getText()); } //noinspection unchecked return (T)child;