not only noclass, throwable will do well here....

This commit is contained in:
Shay Banon 2012-04-22 12:25:10 +03:00
parent cc65d39f06
commit 783649adc7
2 changed files with 4 additions and 2 deletions

View File

@ -312,6 +312,8 @@ public class InternalIndexService extends AbstractIndexComponent implements Inde
shardInjector = modules.createChildInjector(injector);
} catch (CreationException e) {
throw new IndexShardCreationException(shardId, Injectors.getFirstErrorFailure(e));
} catch (Throwable e) {
throw new IndexShardCreationException(shardId, e);
}
shardsInjectors = newMapBuilder(shardsInjectors).put(shardId.id(), shardInjector).immutableMap();

View File

@ -284,10 +284,10 @@ public class InternalIndicesService extends AbstractLifecycleComponent<IndicesSe
Injector indexInjector;
try {
indexInjector = modules.createChildInjector(injector);
} catch (NoClassDefFoundError e) {
throw new IndexCreationException(index, e);
} catch (CreationException e) {
throw new IndexCreationException(index, Injectors.getFirstErrorFailure(e));
} catch (Throwable e) {
throw new IndexCreationException(index, e);
}
indicesInjectors.put(index.name(), indexInjector);