diff options
Diffstat (limited to 'test/files/pos/simple-exceptions.scala')
-rw-r--r-- | test/files/pos/simple-exceptions.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/simple-exceptions.scala b/test/files/pos/simple-exceptions.scala new file mode 100644 index 0000000000..52c33fb43a --- /dev/null +++ b/test/files/pos/simple-exceptions.scala @@ -0,0 +1,20 @@ +import java.io.IOException; + +object Test { + + //def error[a](x: String):a = new java.lang.RuntimeException(x) throw; + + def main(args: Array[String]): Unit = { + try { + try { + Console.println("hi!"); + error("xx"); + } finally { + Console.println("ho!") + } + } catch { + case ex: IOException => Console.println("io exception!"); + case ex => Console.println(ex); + } + } +} |