mirror of https://github.com/sbt/sbt.git
Silence boring Eclipse warnings: catching all exceptions, part 2
These warning fixes are new since my last pull request, please verify.
This commit is contained in:
parent
236143be8d
commit
d64a0e078d
|
|
@ -258,7 +258,7 @@ object IvyActions
|
|||
resolver.publish(artifact, file, overwrite)
|
||||
resolver.commitPublishTransaction()
|
||||
} catch {
|
||||
case e =>
|
||||
case e: Throwable =>
|
||||
try { resolver.abortPublishTransaction() }
|
||||
finally { throw e }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ final class TestRunner(framework: Framework, loader: ClassLoader, listeners: Seq
|
|||
}
|
||||
catch
|
||||
{
|
||||
case e =>
|
||||
case e: Throwable =>
|
||||
safeListenersCall(_.endGroup(name, e))
|
||||
TestResult.Error
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ private[sbt] object Analyze
|
|||
|
||||
def load(tpe: String, errMsg: => Option[String]): Option[Class[_]] =
|
||||
try { Some(Class.forName(tpe, false, loader)) }
|
||||
catch { case e => errMsg.foreach(msg => log.warn(msg + " : " +e.toString)); None }
|
||||
catch { case e: Throwable => errMsg.foreach(msg => log.warn(msg + " : " +e.toString)); None }
|
||||
|
||||
val productToSource = new mutable.HashMap[File, File]
|
||||
val sourceToClassFiles = new mutable.HashMap[File, Buffer[ClassFile]]
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ abstract class EvaluateSettings[Scope]
|
|||
}
|
||||
private[this] def run0(work: => Unit): Unit =
|
||||
{
|
||||
try { work } catch { case e => complete.put( Some(e) ) }
|
||||
try { work } catch { case e: Throwable => complete.put( Some(e) ) }
|
||||
workComplete()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue