improved error message for index mismatch

This commit is contained in:
Michael Hunger
2011-07-23 13:53:51 +02:00
parent 30eb746247
commit 6a930285fc

View File

@@ -73,7 +73,7 @@ public class GraphDatabaseContext {
Map<String, String> config = fullText ? LuceneIndexImplementation.FULLTEXT_CONFIG : null;
if (NodeBacked.class.isAssignableFrom(type)) return (Index<S>) getIndexManager().forNodes(indexName, config);
if (RelationshipBacked.class.isAssignableFrom(type)) return (Index<S>) getIndexManager().forRelationships(indexName, config);
throw new IllegalArgumentException("Wrong index type supplied: " + type);
throw new IllegalArgumentException("Wrong index type supplied: " + type+" expected Node- or Relationship-Entity");
}
/**