From 7c50f319ef30cf2c8290d6c6140c01ae77447a97 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Mon, 13 Jul 2015 18:15:58 -0400 Subject: [PATCH 1/2] Updating the description of Future exception re-throwing See https://groups.google.com/forum/#!topic/scala-language/PeAuAK6_Aj8 --- overviews/core/_posts/2012-09-20-futures.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/overviews/core/_posts/2012-09-20-futures.md b/overviews/core/_posts/2012-09-20-futures.md index bfbdaeb262..96ae208e98 100644 --- a/overviews/core/_posts/2012-09-20-futures.md +++ b/overviews/core/_posts/2012-09-20-futures.md @@ -686,14 +686,13 @@ keeping this exception, the associated value is stored into the future or a prom 2. `ExecutionException` - stored when the computation fails due to an unhandled `InterruptedException`, `Error` or a `scala.util.control.ControlThrowable`. In this case the -`ExecutionException` has the unhandled exception as its cause. These -exceptions are rethrown in the thread executing the failed -asynchronous computation. The rationale behind this is to prevent -propagation of critical and control-flow related exceptions normally -not handled by the client code and at the same time inform the client -in which future the computation failed. - -See [`NonFatal`](http://www.scala-lang.org/api/current/index.html#scala.util.control.NonFatal$) +`ExecutionException` has the unhandled exception as its cause. The rationale +behind this is to prevent propagation of critical and control-flow related +exceptions normally not handled by the client code and at the same time inform +the client in which future the computation failed. + +Fatal exceptions (as determined by `NonFatal`) are rethrown in the thread executing +the failed asynchronous computation. See [`NonFatal`](http://www.scala-lang.org/api/current/index.html#scala.util.control.NonFatal$) for a more precise semantics description. ## Promises From d929ca9cec1f0febe9bcb695c5132bdd3834843b Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Tue, 14 Jul 2015 18:59:15 -0400 Subject: [PATCH 2/2] Updated description of fatal exception rethrowing Based on review comments by @viktorklang --- overviews/core/_posts/2012-09-20-futures.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/overviews/core/_posts/2012-09-20-futures.md b/overviews/core/_posts/2012-09-20-futures.md index 96ae208e98..9c3c5bba2b 100644 --- a/overviews/core/_posts/2012-09-20-futures.md +++ b/overviews/core/_posts/2012-09-20-futures.md @@ -692,8 +692,10 @@ exceptions normally not handled by the client code and at the same time inform the client in which future the computation failed. Fatal exceptions (as determined by `NonFatal`) are rethrown in the thread executing -the failed asynchronous computation. See [`NonFatal`](http://www.scala-lang.org/api/current/index.html#scala.util.control.NonFatal$) -for a more precise semantics description. +the failed asynchronous computation. This informs the code managing the executing +threads of the problem and allows it to fail fast, if necessary. See +[`NonFatal`](http://www.scala-lang.org/api/current/index.html#scala.util.control.NonFatal$) +for a more precise description of the semantics. ## Promises