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:
Paolo G. Giarrusso 2012-12-16 20:30:30 +01:00 committed by Mark Harrah
parent dd007f9442
commit e5673f7426
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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] =

View File

@ -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 => () } }