From 18478625fdf2336a0b03be85d09a395f37c9fc1e Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 11 Feb 2013 21:47:59 +0100 Subject: [PATCH] a more reliable error handling in gdsl initialization --- .../plugins/groovy/dsl/GroovyDslFileIndex.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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();