Scala 3 (Dotty) is experimenting with optional braces (significant indentation) so the following works
scala> try
| 1 / 0
| catch
| case e => println(s"good catch $e")
| finally
| println("Celebration dance :)")
|
good catch java.lang.ArithmeticException: / by zero
Celebration dance :)
val res1: AnyVal = ()
where we note the handler
case e => println(s"good catch $e")
did not need braces as in Scala 2. In fact due to special treatment of case clauses after catch keyword the following would also work
scala> try
| 1 / 0
| catch
| case e => println(s"good catch $e")
| finally
| println("Celebration dance :)")
|
good catch java.lang.ArithmeticException: / by zero
Celebration dance :)
val res2: AnyVal = ()
where we note the handler did not have to be indented after catch
catch
case e => println(s"good catch $e")