JAL-4285 don’t say you are reporting warnings/errors when there are none..
authorJames Procter <j.procter@dundee.ac.uk>
Wed, 20 Sep 2023 17:03:37 +0000 (18:03 +0100)
committerJames Procter <j.procter@dundee.ac.uk>
Wed, 20 Sep 2023 17:03:37 +0000 (18:03 +0100)
src/jalview/bin/Commands.java

index 36d8e88..faa5e43 100644 (file)
@@ -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))