Try/catch/finally Expressions

try {
    // your scala code here
} 
catch {
    case foo: FooException => handleFooException(foo)
    case bar: BarException => handleBarException(bar)
    case _: Throwable => println("Got some other kind of Throwable exception")
} finally {
    // your scala code here, such as closing a database connection
    // or file handle
}
Try/catch/finally Expressions → are a → Control Structures.

Try/catch/finally Expressions — Structure map

Clickable & Draggable!

Try/catch/finally Expressions — Related pages: