]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Better error reporting when graph module does not have URI 37/1237/1
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Sun, 19 Nov 2017 08:50:35 +0000 (10:50 +0200)
committerHannu Niemistö <hannu.niemisto@semantum.fi>
Sun, 19 Nov 2017 08:50:35 +0000 (10:50 +0200)
refs #7626

Change-Id: I4c140ef09a13e2951b23557e086dc8baed7d7b34

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;