What\'s the cleanest way to map the Exception of a failed Future in scala?
map
Exception
Future
Say I have:
import scala.concurrent
You could try recoverWith as in:
recoverWith
f recoverWith{ case ex:Exception => Future.failed(new Exception("foo", ex)) }