8000 Prefer NonFatal to catch-all · scala/scala@6ea44b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6ea44b7

Browse files
committed
Prefer NonFatal to catch-all
1 parent bee5534 commit 6ea44b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/scala/tools/nsc/classpath/DirectoryClassPath.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import scala.tools.nsc.CloseableRegistry
2323
import scala.tools.nsc.classpath.PackageNameUtils.{packageContains, separatePkgAndClassNames}
2424
import scala.tools.nsc.util.{ClassPath, ClassRepresentation, EfficientClassPath}
2525
import scala.util.Properties.{isJavaAtLeast, javaHome}
26+
import scala.util.control.NonFatal
2627
import FileUtils._
2728

2829
/**
@@ -168,7 +169,7 @@ object JrtClassPath {
168169
List(classPath)
169170
}
170171
} catch {
171-
case _: Throwable => Nil
172+
case NonFatal(_) => Nil
172173
}
173174
private def createJrt(closeableRegistry: CloseableRegistry): List[JrtClassPath] =
174175
try {

0 commit comments

Comments
 (0)
0