diagnostics

This commit is contained in:
Dmitry Jemerov
2012-08-07 14:07:57 +02:00
parent ef8b7735cd
commit 154b10fde0
@@ -99,7 +99,7 @@ public class PyBaseElementImpl<T extends StubElement> extends StubBasedPsiElemen
protected <T extends PyElement> 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<T extends StubElement> extends StubBasedPsiElemen
protected <T extends PyElement> 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;