Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[writing-async-app-in-scala-part-2] trivial example
def rpcCall: Future[Option[String]]
def reportException(e: Throwable): Unit
def getUrlSafe: Future[Option[String]] = {
rpcCall.recover {
case e: Throwable =>
reportException(e)
None
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment