summaryrefslogblamecommitdiff
path: root/test/files/run/finally.scala
blob: e4715c59aedf9c96b7bf7d1fb3039b3a5b19d13d (plain) (tree)
1
2
3

                                                              
                         


















                                        
// test that finally is not covered by any exception handlers.
object Test extends App {
  def bar {
    try {
      println("hi")
    }
    catch {
      case e => println("GOT HERE")
    }
    finally {
      println("In Finally")
      throw new RuntimeException("ouch")
    }
  }

  try {
    bar
  } catch {
    case e => println(e)
  }
}