From: Ben Soares Date: Tue, 14 May 2024 20:07:09 +0000 (+0100) Subject: JAL-1054 Also recognise UnknownHostException as a file not found at URL X-Git-Tag: Release_2_11_4_0~28^2~32 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8103248d1f5a5d30c98f88ff3dda1444cf8aabb8;p=jalview.git JAL-1054 Also recognise UnknownHostException as a file not found at URL --- diff --git a/src/jalview/io/FileParse.java b/src/jalview/io/FileParse.java index ca0588a..fd12dc6 100755 --- a/src/jalview/io/FileParse.java +++ b/src/jalview/io/FileParse.java @@ -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;