Skip to content

Commit

Permalink
Expand excludedExceptions to throwables
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Jan 1, 2025
1 parent 9503542 commit e4da4c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ val io = (project in file("io"))
"1.7.0",
"1.8.0",
"1.9.0",
"1.10.0",
) map (version => organization.value %% moduleName.value % version)
}),
mimaBinaryIssueFilters ++= Seq(
Expand Down
6 changes: 3 additions & 3 deletions io/src/main/scala/sbt/internal/io/Retry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ private[sbt] object Retry {
try System.getProperty("sbt.io.retry.limit", defaultLimit.toString).toInt
catch { case NonFatal(_) => defaultLimit }
}
private[sbt] def apply[@specialized T](f: => T, excludedExceptions: Class[? <: IOException]*): T =
private[sbt] def apply[@specialized T](f: => T, excludedExceptions: Class[? <: Throwable]*): T =
apply(f, limit, excludedExceptions: _*)
private[sbt] def apply[@specialized T](
f: => T,
limit: Int,
excludedExceptions: Class[? <: IOException]*,
excludedExceptions: Class[? <: Throwable]*,
): T = apply(f, limit, 100, excludedExceptions: _*)
private[sbt] def apply[@specialized T](
f: => T,
limit: Int,
sleepInMillis: Long,
excludedExceptions: Class[? <: IOException]*,
excludedExceptions: Class[? <: Throwable]*,
): T = {
require(limit >= 1, "limit must be 1 or higher: was: " + limit)
def filter(e: Throwable): Boolean = excludedExceptions match {
Expand Down

0 comments on commit e4da4c5

Please sign in to comment.