diff --git a/akka-actor/src/main/scala/akka/dispatch/Future.scala b/akka-actor/src/main/scala/akka/dispatch/Future.scala index 8904eab61d..a3cdd9c139 100644 --- a/akka-actor/src/main/scala/akka/dispatch/Future.scala +++ b/akka-actor/src/main/scala/akka/dispatch/Future.scala @@ -310,7 +310,7 @@ object Future { def flow[A](body: ⇒ A @cps[Future[Any]])(implicit dispatcher: MessageDispatcher, timeout: Timeout): Future[A] = { val future = Promise[A](timeout) //dispatcher dispatchTask { () ⇒ - reify(body) foreachFull (future completeWithResult, future completeWithException) onException { + (reify(body) foreachFull (future completeWithResult, future completeWithException): Future[Any]) onException { case e: Exception ⇒ future completeWithException e } //}