From c50bc3cc6be9e1d21793c2e9c6777ca933d3a043 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hannu=20Niemist=C3=B6?= Date: Thu, 19 Jan 2017 10:55:04 +0200 Subject: [PATCH] Log an exception in ModuleSourceRepository The previous implementation just printed exception to console. refs #5920 Change-Id: Icd317b670403db0987c740a216c2f69f72427d09 --- .../modeling/scl/OntologyModuleSourceRepository.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/OntologyModuleSourceRepository.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/OntologyModuleSourceRepository.java index 6fbcfd8e9..1e9df2e19 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/OntologyModuleSourceRepository.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/scl/OntologyModuleSourceRepository.java @@ -13,11 +13,15 @@ import org.simantics.scl.compiler.source.ModuleSource; import org.simantics.scl.compiler.source.PrecompiledModuleSource; import org.simantics.scl.compiler.source.repository.ModuleSourceRepository; import org.simantics.scl.runtime.SCLContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import gnu.trove.procedure.TObjectProcedure; public enum OntologyModuleSourceRepository implements ModuleSourceRepository { INSTANCE; + + private static final Logger LOGGER = LoggerFactory.getLogger(OntologyModuleSourceRepository.class); static class ModuleSourceRequest extends UnaryRead { @@ -47,7 +51,7 @@ public enum OntologyModuleSourceRepository implements ModuleSourceRepository { return Simantics.getSession().syncRequest(new ModuleSourceRequest(moduleName)); } catch(DatabaseException e) { - e.printStackTrace(); + LOGGER.error("Failed to read ontology module " + moduleName + ".", e); return null; } } -- 2.47.1