summaryrefslogtreecommitdiff
path: root/test/files/pos/exceptions.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2003-03-04 12:10:52 +0000
committerMartin Odersky <odersky@gmail.com>2003-03-04 12:10:52 +0000
commit91c9a415e380539da3c6acabda2cf70afbf2cc47 (patch)
treeaff5d4ff5c546d3f5228cd1bd6b1151211a7ae07 /test/files/pos/exceptions.scala
parentfc497536ed884b4d18860f6db644d4143412c2f5 (diff)
downloadscala-91c9a415e380539da3c6acabda2cf70afbf2cc47.tar.gz
scala-91c9a415e380539da3c6acabda2cf70afbf2cc47.tar.bz2
scala-91c9a415e380539da3c6acabda2cf70afbf2cc47.zip
*** empty log message ***
Diffstat (limited to 'test/files/pos/exceptions.scala')
-rw-r--r--test/files/pos/exceptions.scala19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/files/pos/exceptions.scala b/test/files/pos/exceptions.scala
index 93140ddbbe..50d84d3d30 100644
--- a/test/files/pos/exceptions.scala
+++ b/test/files/pos/exceptions.scala
@@ -1,6 +1,21 @@
+import java.io._;
+
module test {
- def error[a](x: String):a = new java.lang.RuntimeException(x) throw;
+ //def error[a](x: String):a = new java.lang.RuntimeException(x) throw;
+
+ def main(): Unit {
+ try {
+ try {
+ error[Unit]("hi!");
+ } finally {
+ System.out.println("ho!")
+ }
+ } except {
+ case ex: IOException => System.out.println("io exception!");
+ case ex => System.out.println(ex);
+ }
+ }
- def main = error("hi!");
+ main();
} \ No newline at end of file