]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexSchema.java
Replace instantiations of DatabaseException in indexing
[simantics/platform.git] / bundles / org.simantics.db.indexing / src / org / simantics / db / indexing / IndexSchema.java
index a11c90df8e2a11f1ab5b831baae2c422c66ad203..d1d2dd26746a687cc68317ae3c9227a4b4555837 100644 (file)
@@ -11,8 +11,6 @@
  *******************************************************************************/
 package org.simantics.db.indexing;
 
-import gnu.trove.map.hash.THashMap;
-
 import java.util.Collections;
 import java.util.EnumSet;
 import java.util.Map;
@@ -23,9 +21,12 @@ import org.simantics.db.Resource;
 import org.simantics.db.common.request.UniqueRead;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.exception.RuntimeDatabaseException;
+import org.simantics.db.indexing.exception.IndexingException;
 import org.simantics.db.layer0.adapter.GenericRelation;
 import org.simantics.utils.datastructures.Pair;
 
+import gnu.trove.map.hash.THashMap;
+
 /**
  * @author Tuukka Lehtonen
  * @since 1.20.0, 1.18.4
@@ -97,8 +98,7 @@ class IndexSchema {
             GenericRelation r = graph.adapt(relation, GenericRelation.class);
             return new IndexSchema( r.getFields() );
         } catch (IllegalArgumentException e) {
-            throw new DatabaseException(
-                    "Failed to read index schema for relation " + relation + ". See cause for reason.", e);
+            throw new IndexingException("Failed to read index schema for relation " + relation + ". See cause for reason.", e);
         }
     }