From: Tuukka Lehtonen Date: Wed, 20 Nov 2019 18:34:59 +0000 (+0200) Subject: Log throwables in DiagramViewerLoadJob instead of swallowing them X-Git-Tag: v1.43.0~136^2~30 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=b45e9e5c1696a2e729dcecac0f58d16c15391770;p=simantics%2Fplatform.git Log throwables in DiagramViewerLoadJob instead of swallowing them gitlab #420 Change-Id: I493d7eeb0a6a13a188578fe218d68de8e195080e --- diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerLoadJob.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerLoadJob.java index 62b1d028f..decf3356c 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerLoadJob.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerLoadJob.java @@ -24,9 +24,13 @@ import org.simantics.g2d.diagram.IDiagram; import org.simantics.modeling.ui.Activator; import org.simantics.utils.DataContainer; import org.simantics.utils.threads.ThreadUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DiagramViewerLoadJob extends DatabaseJob { + private static final Logger LOGGER = LoggerFactory.getLogger(DiagramViewerLoadJob.class); + private static final boolean PROFILE = false; private DiagramViewer viewer; @@ -108,6 +112,7 @@ public class DiagramViewerLoadJob extends DatabaseJob { END(task); } catch (Throwable t) { viewer = null; + LOGGER.error("Failed to complete loading of diagram {} in the canvas thread", viewer.diagramResource, t); } } });