From 92faf11646c0b547de0b609adde82aa11d1282ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Sun, 19 Nov 2017 10:50:35 +0200 Subject: [PATCH] Better error reporting when graph module does not have URI refs #7626 Change-Id: I4c140ef09a13e2951b23557e086dc8baed7d7b34 --- .../simantics/modeling/scl/GraphModuleSourceRepository.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.47.1