Skip to content

Instantly share code, notes, and snippets.

@yayj
Created August 9, 2013 04:51
Show Gist options
  • Save yayj/6191267 to your computer and use it in GitHub Desktop.
Save yayj/6191267 to your computer and use it in GitHub Desktop.
Future.onSuccess and Future.onFailure
future.onFailure {
case e: Exception =>
Logger.warn("SMS: Error: " + e.getMessage)
case _ =>
Logger.warn("SMS: Unknown error")
}
future.onSuccess {
case response: Response =>
response.status match {
case 200 =>
case _ =>
Logger.warn("Failed to send SMS")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment