This always returns an Option[Int] Option("bad") filter { _ != None } map { catching(classOf[NumberFormatException]) opt _.toInt } getOrElse None An idiomatic way of converting an Option[String] into an Option[Int] ...31 Mar, 2014 in scala / software development by