From b6778be91900b8161e705dc2598ef7af86842b0b Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Wed, 2 Nov 2011 14:34:35 +0000 Subject: Begone t1737... --- test/files/run/exceptions-2.scala | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'test/files/run/exceptions-2.scala') 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); -- cgit v1.2.3