From: jsimomaa Date: Tue, 25 Feb 2020 13:26:33 +0000 (+0200) Subject: Finish exception handling in AdapterRegistry2 X-Git-Tag: v1.43.0~80 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F15%2F3915%2F1;p=simantics%2Fplatform.git Finish exception handling in AdapterRegistry2 gitlab #480 Change-Id: I339986806570a4373456e4fb92a7b7712f531f7b (cherry picked from commit 8eea274269dd791b7ef95ca03bf891654e0c4ffc) --- 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); } }