Empty catch block seems to be invalid in Scala
try { func() } catch { } // error: illegal start of simple expression
How I can catch all
What about:
import scala.util.control.Exception.catching catching(classOf[Any]) opt {func()}
It generates an Option like in some of the previous answers.