mirror of https://github.com/sbt/sbt.git
Silence boring Eclipse warnings: catching all exceptions
Here I make explicit where catching all exceptions is intended. Mark Harrah corrected one decision during review.
This commit is contained in:
parent
dd007f9442
commit
e5673f7426
|
|
@ -82,7 +82,7 @@ object SettingsTest extends Properties("settings")
|
|||
|
||||
def evaluate(settings: Seq[Setting[_]]): Settings[Scope] =
|
||||
try { make(settings)(delegates, scopeLocal, showFullKey) }
|
||||
catch { case e => e.printStackTrace; throw e }
|
||||
catch { case e: Throwable => e.printStackTrace; throw e }
|
||||
}
|
||||
// This setup is a workaround for module synchronization issues
|
||||
final class CCR(intermediate: Int)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ object ErrorHandling
|
|||
{
|
||||
case ex @ (_: Exception | _: StackOverflowError) => Left(ex)
|
||||
case err @ (_: ThreadDeath | _: VirtualMachineError) => throw err
|
||||
case x => Left(x)
|
||||
case x: Throwable => Left(x)
|
||||
}
|
||||
|
||||
def convert[T](f: => T): Either[Exception, T] =
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class BufferedLogger(delegate: AbstractLogger) extends BasicLogger
|
|||
clear()
|
||||
result
|
||||
}
|
||||
catch { case e => stopQuietly(); throw e }
|
||||
catch { case e: Throwable => stopQuietly(); throw e }
|
||||
}
|
||||
def stopQuietly() = synchronized { try { stop() } catch { case e: Exception => () } }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue