summaryrefslogtreecommitdiff
path: root/test/files/run/exceptions-2.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/exceptions-2.scala')
-rw-r--r--test/files/run/exceptions-2.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/run/exceptions-2.scala b/test/files/run/exceptions-2.scala
index f5bbcca210..8d755c3809 100644
--- a/test/files/run/exceptions-2.scala
+++ b/test/files/run/exceptions-2.scala
@@ -42,7 +42,7 @@ object NoExcep {
def method4 = try {
Console.println("..");
} catch {
- case _ => sys.error("..");
+ case _: Throwable => sys.error("..");
}
}
@@ -136,7 +136,7 @@ object Test {
try {
sys.error("a");
} catch {
- case _ => Console.println("Silently ignore exception in finally");
+ case _: Throwable => Console.println("Silently ignore exception in finally");
}
}
}
@@ -146,7 +146,7 @@ object Test {
} finally {
val fin = "Abc";
Console.println(fin);
- };
+ }
def tryAndValInFinally: Unit =
try {
@@ -154,8 +154,8 @@ object Test {
val fin = "Abc";
try {
Console.println(fin);
- } catch { case _ => () }
- };
+ } catch { case _: Throwable => () }
+ }
def returnInBody: Unit = try {
try {
@@ -249,7 +249,7 @@ object Test {
def execute(f: => Unit) = try {
f;
} catch {
- case _ => ();
+ case _: Throwable => ()
}