From 8103248d1f5a5d30c98f88ff3dda1444cf8aabb8 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Tue, 14 May 2024 21:07:09 +0100 Subject: [PATCH] JAL-1054 Also recognise UnknownHostException as a file not found at URL --- src/jalview/io/FileParse.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 1.7.10.2