Merge branch 'improvement/JAL-4409_implement_extra_schemes_in_getdown' into develop
[jalview.git] / src / jalview / bin / Jalview.java
index e343b0f..6d28da1 100755 (executable)
@@ -23,6 +23,7 @@ package jalview.bin;
 import java.awt.Color;
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -103,6 +104,7 @@ import jalview.util.HttpUtils;
 import jalview.util.LaunchUtils;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
+import jalview.util.UserAgent;
 import jalview.ws.jws2.Jws2Discoverer;
 
 /**
@@ -639,7 +641,7 @@ public class Jalview implements JalviewObjectI
     {
       headless = true;
     }
-    System.setProperty("http.agent", HttpUtils.getUserAgent());
+    System.setProperty("http.agent", UserAgent.getUserAgent());
 
     try
     {
@@ -938,9 +940,12 @@ public class Jalview implements JalviewObjectI
       try
       {
         format = new IdentifyFile().identify(file, protocol);
-      } catch (FileFormatException e1)
+      } catch (FileNotFoundException e)
       {
-        // TODO ?
+        Console.error("File at '" + file + "' not found", e);
+      } catch (FileFormatException e)
+      {
+        Console.error("File '" + file + "' format not recognised", e);
       }
 
       AlignFrame af = fileLoader.LoadFileWaitTillLoaded(file, protocol,
@@ -1211,9 +1216,12 @@ public class Jalview implements JalviewObjectI
         try
         {
           format = new IdentifyFile().identify(file, protocol);
+        } catch (FileNotFoundException e)
+        {
+          Console.error("File at '" + file + "' not found", e);
         } catch (FileFormatException e)
         {
-          // TODO what?
+          Console.error("File '" + file + "' format not recognised", e);
         }
       }