Skip to content

Commit 103a571

Browse files
committed
Log warning if graph SVG generation fails
1 parent 42285fb commit 103a571

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

experiment/src/org/labkey/experiment/ExperimentRunGraph.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,19 @@ private static String getSvg(String dot) throws ExecuteException
5353
if (graph.isEmpty())
5454
return ""; // Graphviz.toSvgStr() throws an exception if the graph is empty.
5555

56-
String svg = graph.toSvgStr();
56+
try
57+
{
58+
String svg = graph.toSvgStr();
5759

58-
// Scale down to 50% of default size. This is arbitrary but seems reasonable. Diagrams are larger than
59-
// the old image-based ones, but monitors are much higher resolution than when those were scaled.
60-
return SvgUtil.scaleSize(svg, 0.5f);
60+
// Scale down to 50% of default size. This is arbitrary but seems reasonable. Diagrams are larger than
61+
// the old image-based ones, but monitors are much higher resolution than when those were scaled.
62+
return SvgUtil.scaleSize(svg, 0.5f);
63+
}
64+
catch (ExecuteException ex)
65+
{
66+
LOG.warn("Error generating graph", ex);
67+
throw ex;
68+
}
6169
}
6270

6371
private static String getDotGraph(Container c, ExpRunImpl run, boolean detail, String focus, String focusType)

0 commit comments

Comments
 (0)