summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/ant/FastScalac.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-07-20 16:21:00 +0200
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-07-20 17:19:50 +0200
commite4db7e05023d66a42bddcd0d194cf239971de9d4 (patch)
tree689bb8d78e84f3da6a1c6f1ddbe0ef634b555df8 /src/compiler/scala/tools/ant/FastScalac.scala
parentc1816313f52860d47dc7f3efed195f5b0482743b (diff)
downloadscala-e4db7e05023d66a42bddcd0d194cf239971de9d4.tar.gz
scala-e4db7e05023d66a42bddcd0d194cf239971de9d4.tar.bz2
scala-e4db7e05023d66a42bddcd0d194cf239971de9d4.zip
address "this would catch all throwables" warnings
original patch by @odersky in #955 -- criterion for the refactor: "catch Throwable as long as there's no obvious control flow exception going through the catch and the caught exception is processed further" rebased & updated with review comments in #955 and #954
Diffstat (limited to 'src/compiler/scala/tools/ant/FastScalac.scala')
-rw-r--r--src/compiler/scala/tools/ant/FastScalac.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/ant/FastScalac.scala b/src/compiler/scala/tools/ant/FastScalac.scala
index c0d7441ad5..f146722087 100644
--- a/src/compiler/scala/tools/ant/FastScalac.scala
+++ b/src/compiler/scala/tools/ant/FastScalac.scala
@@ -159,7 +159,7 @@ class FastScalac extends Scalac {
val url = ScalaClassLoader.originOfClass(classOf[FastScalac]).get
File(url.getFile).jfile.getParentFile.getParentFile.getAbsolutePath
} catch {
- case _ =>
+ case _: Throwable =>
buildError("Compilation failed because of an internal compiler error;"+
" couldn't determine value for -Dscala.home=<value>")
}