From: James Procter Date: Wed, 20 Sep 2023 17:03:37 +0000 (+0100) Subject: JAL-4285 don’t say you are reporting warnings/errors when there are none.. X-Git-Tag: Release_2_11_4_0~175 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=028dbea7b4d76fb62d77d52879c37316eaca5d93;p=jalview.git JAL-4285 don’t say you are reporting warnings/errors when there are none.. --- diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 36d8e88..faa5e43 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -149,10 +149,14 @@ public class Commands } - // report errors - Console.warn( - "The following errors and warnings occurred whilst processing files:\n" - + errorsToString()); + // report errors - if any + String errorsRaised = errorsToString(); + if (errorsRaised.trim().length() > 0) + { + Console.warn( + "The following errors and warnings occurred whilst processing files:\n" + + errorsRaised); + } // gui errors reported in Jalview if (argParser.getBoolean(Arg.QUIT))