summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/util
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/util
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/util')
-rw-r--r--src/compiler/scala/tools/util/VerifyClass.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/util/VerifyClass.scala b/src/compiler/scala/tools/util/VerifyClass.scala
index 5f636f63fb..e0e089d0b2 100644
--- a/src/compiler/scala/tools/util/VerifyClass.scala
+++ b/src/compiler/scala/tools/util/VerifyClass.scala
@@ -13,7 +13,8 @@ object VerifyClass {
Class.forName(name, true, cl)
(name, None)
} catch {
- case x => (name, Some(x.toString))
+ case x: Throwable => // TODO: only catch VerifyError (and related) + ExceptionInInitializationError (for static objects that bomb on classload)
+ (name, Some(x.toString))
}
}