From: Hannu Niemistö Date: Sun, 19 Nov 2017 08:50:35 +0000 (+0200) Subject: Better error reporting when graph module does not have URI X-Git-Tag: v1.31.0~29 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F1237%2F1;p=simantics%2Fplatform.git Better error reporting when graph module does not have URI refs #7626 Change-Id: I4c140ef09a13e2951b23557e086dc8baed7d7b34 --- diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/GraphModuleSourceRepository.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/GraphModuleSourceRepository.java index b6d6caefd..3d767f520 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/GraphModuleSourceRepository.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/GraphModuleSourceRepository.java @@ -185,7 +185,11 @@ public enum GraphModuleSourceRepository implements ModuleSourceRepository { Collection 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;