Skip to content

Commit

Permalink
Prefer NonFatal to catch-all
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Dec 6, 2023
1 parent bee5534 commit 6ea44b7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import scala.tools.nsc.CloseableRegistry
import scala.tools.nsc.classpath.PackageNameUtils.{packageContains, separatePkgAndClassNames}
import scala.tools.nsc.util.{ClassPath, ClassRepresentation, EfficientClassPath}
import scala.util.Properties.{isJavaAtLeast, javaHome}
import scala.util.control.NonFatal
import FileUtils._

/**
Expand Down Expand Up @@ -168,7 +169,7 @@ object JrtClassPath {
List(classPath)
}
} catch {
case _: Throwable => Nil
case NonFatal(_) => Nil
}
private def createJrt(closeableRegistry: CloseableRegistry): List[JrtClassPath] =
try {
Expand Down

0 comments on commit 6ea44b7

Please sign in to comment.