X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsImpl.java;h=60e824cad0bf4f84592e25dbeda6b0a1b4939112;hp=390c0d17fce817225bde69d07e4515408fee4229;hb=4aba159170fc72d39c2f930ea224aa71f4cdc2e7;hpb=59cab457bcc89618e8557235fd65eaecbe583592 diff --git a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java index 390c0d17f..60e824cad 100644 --- a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java +++ b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java @@ -174,9 +174,8 @@ public class IndexedRelationsImpl implements IndexedRelations { // 3. something was wrong, but the index has been successfully cleaned } - if(!searcher.checkState(State.NONE)) - throw new IndexException("Illegal searcher state, contact application support."); - + searcher.assertState(State.NONE); + // We loop until the index is loaded while(true) { @@ -240,7 +239,7 @@ public class IndexedRelationsImpl implements IndexedRelations { if(!loaded) { if(!searcher.checkState(State.NONE)) - throw new DatabaseException("Illegal searcher state, contact application support."); + throw new DatabaseException("Illegal searcher state " + searcher.state()); try { SerialisationSupport ss = graph.getService(SerialisationSupport.class); @@ -273,7 +272,7 @@ public class IndexedRelationsImpl implements IndexedRelations { } if(!success) - throw new IndexException("Did not manage to load index. Contact application support."); + throw new IndexException("Did not manage to load index."); // Try again @@ -283,7 +282,7 @@ public class IndexedRelationsImpl implements IndexedRelations { if (searcher.isIndexAvailable()) { searcher.startAccess(progress.newChild(50), processor.getSession(), false); if(searcher.hasAccess(false)) return lock; - throw new IndexException("Illegal searcher state, contact application support."); + throw new IndexException("Illegal searcher state " + searcher.state()); } }