]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/DependenciesRelation.java
Ignore NoSingleResultException in DependenciesRelation
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / genericrelation / DependenciesRelation.java
index 333f3771c843c636e2838b51b0d32488edf6e7fa..fc32222084c0f7e08509c152a882b893e7bd5b61 100644 (file)
@@ -43,6 +43,7 @@ import org.simantics.db.common.request.UnaryRead;
 import org.simantics.db.common.utils.NameUtils;
 import org.simantics.db.event.ChangeListener;
 import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.exception.NoSingleResultException;
 import org.simantics.db.layer0.adapter.GenericRelation;
 import org.simantics.db.layer0.adapter.GenericRelationIndex;
 import org.simantics.db.layer0.genericrelation.DependencyChanges.Change;
@@ -151,7 +152,13 @@ public class DependenciesRelation extends UnsupportedRelation implements Generic
 
                                @Override
                                public void exception(AsyncReadGraph graph, Throwable throwable) {
-                                       LOGGER.error("Could not compile for resource {}", resource, throwable);
+                                   if (throwable instanceof NoSingleResultException) {
+                                       // Ignore
+                                       if (LOGGER.isDebugEnabled())
+                                           LOGGER.debug("Could not compile for resource {}", resource, throwable);
+                                   } else {
+                                       LOGGER.error("Could not compile for resource {}", resource, throwable);
+                                   }
                                }
 
                        });