JAL-1054 Also recognise UnknownHostException as a file not found at URL
authorBen Soares <b.soares@dundee.ac.uk>
Tue, 14 May 2024 20:07:09 +0000 (21:07 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Tue, 14 May 2024 20:07:09 +0000 (21:07 +0100)
src/jalview/io/FileParse.java

index ca0588a..fd12dc6 100755 (executable)
@@ -36,6 +36,7 @@ import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
+import java.net.UnknownHostException;
 import java.util.zip.GZIPInputStream;
 
 import jalview.api.AlignExportSettingsI;
@@ -503,7 +504,8 @@ public class FileParse
           String suffixLess = extractSuffix(fileStr);
           if (suffixLess == null)
           {
-            if (e instanceof FileNotFoundException)
+            if (e instanceof FileNotFoundException
+                    || e instanceof UnknownHostException)
             {
               errormessage = "File at URL '" + fileStr + "' not found";
               filenotfound = true;