From e4da4c5e86e799d6041ba80a464e4a536e368b52 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Wed, 1 Jan 2025 02:58:32 -0500 Subject: [PATCH] Expand excludedExceptions to throwables --- build.sbt | 1 + io/src/main/scala/sbt/internal/io/Retry.scala | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 6a492d3a..6f802e3f 100644 --- a/build.sbt +++ b/build.sbt @@ -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( diff --git a/io/src/main/scala/sbt/internal/io/Retry.scala b/io/src/main/scala/sbt/internal/io/Retry.scala index 2d660655..f3f72620 100644 --- a/io/src/main/scala/sbt/internal/io/Retry.scala +++ b/io/src/main/scala/sbt/internal/io/Retry.scala @@ -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 {