diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java index ca405965f44d..a65cb0183400 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java @@ -330,13 +330,13 @@ public class GroovyDslFileIndex extends ScalarIndexExtension { ourStandardScripts = new SoftReference>>(executors); ref.set(executors); } - catch (OutOfMemoryError e) { - stopGdsl = true; - throw e; - } - catch (NoClassDefFoundError e) { - stopGdsl = true; - throw e; + catch (Throwable e) { + LOG.error(e); + ref.set(new ArrayList>()); + //noinspection InstanceofCatchParameter + if (e instanceof Error) { + stopGdsl = true; + } } finally { semaphore.up();