# HG changeset patch # User wenzelm # Date 1489259886 -3600 # Node ID 50cfc6775361c5a6266eb781d198ff3db24e9338 # Parent 9250f944ec0f8da9853ec7ea4ae89f38f0f686a4 more complete exception handling; diff -r 9250f944ec0f -r 50cfc6775361 src/Pure/General/url.scala --- a/src/Pure/General/url.scala Sat Mar 11 16:22:12 2017 +0100 +++ b/src/Pure/General/url.scala Sat Mar 11 20:18:06 2017 +0100 @@ -8,7 +8,7 @@ import java.io.{File => JFile} -import java.nio.file.Paths +import java.nio.file.{Paths, FileSystemNotFoundException} import java.net.{URI, URISyntaxException} import java.net.{URL, MalformedURLException} import java.util.zip.GZIPInputStream @@ -56,7 +56,10 @@ def is_wellformed_file(uri: String): Boolean = try { parse_file(uri); true } - catch { case _: URISyntaxException | _: IllegalArgumentException => false } + catch { + case _: URISyntaxException | _: IllegalArgumentException | _: FileSystemNotFoundException => + false + } def canonical_file(uri: String): JFile = parse_file(uri).getCanonicalFile def canonical_file_name(uri: String): String = canonical_file(uri).getPath