diff options
author | Martin Odersky <odersky@gmail.com> | 2003-03-04 12:10:52 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-03-04 12:10:52 +0000 |
commit | 91c9a415e380539da3c6acabda2cf70afbf2cc47 (patch) | |
tree | aff5d4ff5c546d3f5228cd1bd6b1151211a7ae07 /test/files/pos | |
parent | fc497536ed884b4d18860f6db644d4143412c2f5 (diff) | |
download | scala-91c9a415e380539da3c6acabda2cf70afbf2cc47.tar.gz scala-91c9a415e380539da3c6acabda2cf70afbf2cc47.tar.bz2 scala-91c9a415e380539da3c6acabda2cf70afbf2cc47.zip |
*** empty log message ***
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/exceptions.scala | 19 |
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 |