diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/GroovyBlock.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/GroovyBlock.java index 32184b90452c..8225b524b6c5 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/GroovyBlock.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/GroovyBlock.java @@ -111,6 +111,10 @@ public class GroovyBlock implements Block, GroovyElementTypes, ASTBlock { try { mySubBlocks = new GroovyBlockGenerator(this).generateSubBlocks(); } + catch (AssertionError e) { + final PsiFile file = myNode.getPsi().getContainingFile(); + LogMessageEx.error(LOG, "Formatting failed for file " + file.getName(), file.getText()); + } catch (RuntimeException e) { final PsiFile file = myNode.getPsi().getContainingFile(); LogMessageEx.error(LOG, "Formatting failed for file " + file.getName(), file.getText());