From: James Procter Date: Thu, 8 Jun 2023 10:33:35 +0000 (+0100) Subject: JAL-4196 report an error if structure view doesn’t get created (for whatever reason... X-Git-Tag: Release_2_11_3_0~13^2~7^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dae873d07c9cba8be54c6c48b3da5e6116552a15;p=jalview.git JAL-4196 report an error if structure view doesn’t get created (for whatever reason) during CLI arg processing, and wait around until the viewer has finished importing before doing anything --- diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index bcf231e..7f493e0 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -569,9 +569,20 @@ public class Commands structureFilepath, tft, paeFilepath, false, ssFromStructure, false, viewerType); - if (headless) + if (sv==null) + { + Console.error("Failed to import and open structure view."); + continue; + } + while (sv.isBusy()) { - sv.setAsync(false); + try { + Thread.sleep(25); + } + catch (Exception x) + { + + } } String structureImageFilename = ArgParser.getValueFromSubValOrArg(