Skip to content

Commit 3870bc3

Browse files
committed
Merge pull request #434 from demobox/patch-1
Updating the description of Future exception re-throwing
2 parents a75fcae + d929ca9 commit 3870bc3

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

overviews/core/_posts/2012-09-20-futures.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -686,15 +686,16 @@ keeping this exception, the associated value is stored into the future or a prom
686686
2. `ExecutionException` - stored when the computation fails due to an
687687
unhandled `InterruptedException`, `Error` or a
688688
`scala.util.control.ControlThrowable`. In this case the
689-
`ExecutionException` has the unhandled exception as its cause. These
690-
exceptions are rethrown in the thread executing the failed
691-
asynchronous computation. The rationale behind this is to prevent
692-
propagation of critical and control-flow related exceptions normally
693-
not handled by the client code and at the same time inform the client
694-
in which future the computation failed.
695-
696-
See [`NonFatal`](http://www.scala-lang.org/api/current/index.html#scala.util.control.NonFatal$)
697-
for a more precise semantics description.
689+
`ExecutionException` has the unhandled exception as its cause. The rationale
690+
behind this is to prevent propagation of critical and control-flow related
691+
exceptions normally not handled by the client code and at the same time inform
692+
the client in which future the computation failed.
693+
694+
Fatal exceptions (as determined by `NonFatal`) are rethrown in the thread executing
695+
the failed asynchronous computation. This informs the code managing the executing
696+
threads of the problem and allows it to fail fast, if necessary. See
697+
[`NonFatal`](http://www.scala-lang.org/api/current/index.html#scala.util.control.NonFatal$)
698+
for a more precise description of the semantics.
698699

699700
## Promises
700701

0 commit comments

Comments
 (0)