When creating an index, fail properly on classpath error

This commit is contained in:
Nicolas Lalevée 2012-04-12 16:37:05 +02:00 committed by Shay Banon
parent 4ea5b7d51f
commit cc65d39f06
1 changed files with 2 additions and 0 deletions

View File

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