a more reliable error handling in gdsl initialization

This commit is contained in:
peter
2013-02-11 21:49:01 +01:00
parent 5b1c6873e0
commit 18478625fd
@@ -330,13 +330,13 @@ public class GroovyDslFileIndex extends ScalarIndexExtension<String> {
ourStandardScripts = new SoftReference<List<Pair<File, GroovyDslExecutor>>>(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<Pair<File, GroovyDslExecutor>>());
//noinspection InstanceofCatchParameter
if (e instanceof Error) {
stopGdsl = true;
}
}
finally {
semaphore.up();