summaryrefslogtreecommitdiff
path: root/test/files/run/exceptions-2.scala
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2011-11-02 14:34:35 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2011-11-02 14:34:35 +0000
commitb6778be91900b8161e705dc2598ef7af86842b0b (patch)
treed15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/files/run/exceptions-2.scala
parentac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff)
downloadscala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz
scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2
scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip
Begone t1737...
Diffstat (limited to 'test/files/run/exceptions-2.scala')
-rw-r--r--test/files/run/exceptions-2.scala42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/files/run/exceptions-2.scala b/test/files/run/exceptions-2.scala
index 05aab66dd0..d0312a49b2 100644
--- a/test/files/run/exceptions-2.scala
+++ b/test/files/run/exceptions-2.scala
@@ -68,7 +68,7 @@ object Test {
Console.println("Outermost finally");
}
- def mixed =
+ def mixed =
try {
if (10 > 0)
throw Leaf(10);
@@ -107,7 +107,7 @@ object Test {
case Leaf(a) => Console.println(a);
}
} catch {
- case npe: NullPointerException =>
+ case npe: NullPointerException =>
Console.println("Caught an NPE");
}
@@ -141,14 +141,14 @@ object Test {
}
}
- def valInFinally: Unit =
- try {
+ def valInFinally: Unit =
+ try {
} finally {
val fin = "Abc";
Console.println(fin);
};
- def tryAndValInFinally: Unit =
+ def tryAndValInFinally: Unit =
try {
} finally {
val fin = "Abc";
@@ -157,51 +157,51 @@ object Test {
} catch { case _ => () }
};
- def returnInBody: Unit = try {
+ def returnInBody: Unit = try {
try {
Console.println("Normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
Console.println("inner finally");
}
- } finally {
+ } finally {
Console.println("Outer finally");
}
- def returnInBodySynch: Unit = try {
+ def returnInBodySynch: Unit = try {
synchronized {
try {
Console.println("Synchronized normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
Console.println("inner finally");
}
}
- } finally {
+ } finally {
Console.println("Outer finally");
}
- def returnInBodyAndInFinally: Unit = try {
+ def returnInBodyAndInFinally: Unit = try {
try {
Console.println("Normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
Console.println("inner finally");
return
}
- } finally {
+ } finally {
Console.println("Outer finally");
return
}
- def returnInBodyAndInFinally2: Unit = try {
+ def returnInBodyAndInFinally2: Unit = try {
try {
Console.println("Normal execution...");
- return
+ return
Console.println("non reachable code");
} finally {
try {
@@ -211,7 +211,7 @@ object Test {
Console.println("finally inside finally");
}
}
- } finally {
+ } finally {
Console.println("Outer finally");
return
}
@@ -253,7 +253,7 @@ object Test {
}
- def returnWithFinallyClean: Int = try {
+ def returnWithFinallyClean: Int = try {
try {
Console.println("Normal execution...");
return 10
@@ -262,7 +262,7 @@ object Test {
} finally {
Console.println("inner finally");
}
- } finally {
+ } finally {
Console.println("Outer finally");
try { 1 } catch { case e: java.io.IOException => () }
}
@@ -294,7 +294,7 @@ object Test {
Console.println("mixed: ");
execute(mixed);
-
+
Console.println("withValue1:");
execute(withValue1);
@@ -322,7 +322,7 @@ object Test {
Console.println("NoExcep.method3:");
execute(NoExcep.method3);
-
+
Console.println("NoExcep.method4:");
execute(NoExcep.method4);