]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/scl/GraphModuleSourceRepository.java
Better error reporting when graph module does not have URI
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / scl / GraphModuleSourceRepository.java
index b6d6caefd25c6a93de3eca1990e39fdb62cfbbd6..3d767f520250e4c8d343fb55256183fd52bc4934 100644 (file)
@@ -185,7 +185,11 @@ public enum GraphModuleSourceRepository implements ModuleSourceRepository {
         Collection<Resource> ontologies = Simantics.applySCL("Simantics/SharedOntologies", "getSharedOntologies", graph, Tuple0.INSTANCE);
         for (Resource ontology : ontologies) {
             for(Resource module : ModelingUtils.searchByType(graph, ontology, L0.SCLModule))
-                result.add(graph.getURI(module));
+                try {
+                    result.add(graph.getURI(module));
+                } catch(DatabaseException e) {
+                    LOGGER.error("Failed to find uri for " + module + ".");
+                }
         }
         
         return result;