Rethrow errors in future.

This commit is contained in:
Felix Ableitner 2015-08-22 01:47:02 +02:00
parent 9840feff46
commit 6eed89f8c0
1 changed files with 2 additions and 6 deletions

View File

@ -91,9 +91,7 @@ class ChatService extends Service {
btInterface.create()
Log.i(Tag, "Service started, address is " + crypto.localAddress)
}.onFailure { case e =>
Log.w(Tag, "Error in future", e)
}
}.onFailure {case e => throw e}
}
def showPersistentNotification(): Unit = {
@ -134,9 +132,7 @@ class ChatService extends Service {
val encrypted = crypto.encrypt(crypto.sign(msg))
router.onReceive(encrypted)
onNewMessage(msg)
}.onFailure { case e =>
Log.w(Tag, "Error in future", e)
}
}.onFailure {case e => throw e}
}
private def sendVia(nextHop: Address, msg: Message) =