summaryrefslogtreecommitdiff
path: root/test/files/run/exceptions-2.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2007-11-20 11:11:52 +0000
committerIulian Dragos <jaguarul@gmail.com>2007-11-20 11:11:52 +0000
commite117099d3ddcdfe87b5602887570087b9a443614 (patch)
tree2802f502c9e22449dfb8711a5f3313532d338a30 /test/files/run/exceptions-2.scala
parenta98fe88f2e306061201086ac4c0f6d1baa48b65a (diff)
downloadscala-e117099d3ddcdfe87b5602887570087b9a443614.tar.gz
scala-e117099d3ddcdfe87b5602887570087b9a443614.tar.bz2
scala-e117099d3ddcdfe87b5602887570087b9a443614.zip
Fixed ticket #244.
Diffstat (limited to 'test/files/run/exceptions-2.scala')
-rw-r--r--test/files/run/exceptions-2.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/exceptions-2.scala b/test/files/run/exceptions-2.scala
index 0805ffe295..1c6245b891 100644
--- a/test/files/run/exceptions-2.scala
+++ b/test/files/run/exceptions-2.scala
@@ -235,6 +235,19 @@ object Test {
}
}
+ def tryThrowFinally: Unit = {
+ try {
+ print("A")
+ throw new Exception
+ } catch {
+ case e : Exception =>
+ print("B")
+ throw e
+ } finally {
+ println("C")
+ }
+ }
+
def execute(f: => Unit) = try {
f;
} catch {
@@ -294,5 +307,8 @@ object Test {
Console.println("Return inside body and return in finally inside finally:");
execute(returnInBodyAndInFinally2);
+
+ Console.println("Throw in catch and finally:");
+ execute(tryThrowFinally);
}
}