summaryrefslogtreecommitdiff
path: root/test/files/run/exceptions.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/exceptions.scala')
-rw-r--r--test/files/run/exceptions.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/run/exceptions.scala b/test/files/run/exceptions.scala
index fc3566f85e..f0fe76946b 100644
--- a/test/files/run/exceptions.scala
+++ b/test/files/run/exceptions.scala
@@ -6,8 +6,8 @@
abstract class IntMap[A] {
def lookup(key: Int): A = this match {
- case Empty() => error("KO")
- case _ => error("ok")
+ case Empty() => sys.error("KO")
+ case _ => sys.error("ok")
}
}
@@ -32,7 +32,7 @@ object exceptions {
val value = try {
map.lookup(key)
} catch {
- case e => e.getMessage()
+ case e: Throwable => e.getMessage()
}
check("lookup(" + key + ")", value, "KO");
}