From 68e686fde705a331fe371bf1a0fbd07ae21be26e Mon Sep 17 00:00:00 2001 From: jsimomaa Date: Tue, 25 Feb 2020 15:26:33 +0200 Subject: [PATCH] Finish exception handling in AdapterRegistry2 gitlab #480 Change-Id: I339986806570a4373456e4fb92a7b7712f531f7b (cherry picked from commit 8eea274269dd791b7ef95ca03bf891654e0c4ffc) --- .../simantics/db/services/adaption/AdapterRegistry2.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/AdapterRegistry2.java b/bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/AdapterRegistry2.java index fe9bab552..0db80b1b4 100644 --- a/bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/AdapterRegistry2.java +++ b/bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/AdapterRegistry2.java @@ -34,7 +34,6 @@ import org.simantics.db.Session; import org.simantics.db.adaption.Adapter; import org.simantics.db.adaption.AdapterInstaller; import org.simantics.db.adaption.AdaptionService; -import org.simantics.db.common.request.ReadRequest; import org.simantics.db.exception.DatabaseException; import org.simantics.db.request.Read; import org.simantics.db.services.adaption.reflection.AdaptingDynamicAdapter2; @@ -96,15 +95,12 @@ public class AdapterRegistry2 { } private static void handleException(Exception e, String fileName) { - System.err.println("At " + fileName); - e.printStackTrace(); + LOGGER.error("At {}", fileName, e); } private void handleException(Exception e, AdapterInstaller installer) { String desc = installerSources.get(installer); - if (desc != null) - System.err.println("At " + desc); - e.printStackTrace(); + LOGGER.error("At {}, installer {}", desc, installer, e); } private void handleAdaptersDocument(Loader b, Document doc, String fileName) { @@ -228,7 +224,6 @@ public class AdapterRegistry2 { }, fileName); } catch (Exception e) { - e.printStackTrace(); handleException(e, fileName); } } -- 2.47.1