summaryrefslogtreecommitdiffstats
path: root/async/src/async.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-04-28 09:45:26 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-04-28 09:45:26 +0200
commit3012dc36bbc40e6f8c07a6af7b2fba9d6c826399 (patch)
treec895b04f3b974a28a2b156b36cc9f8c4cd854bbe /async/src/async.h
parentc5595c71f6db276513d5158ccef23c2c7d8d0834 (diff)
downloadsink-3012dc36bbc40e6f8c07a6af7b2fba9d6c826399.tar.gz
sink-3012dc36bbc40e6f8c07a6af7b2fba9d6c826399.zip
Async: Nested job error propagation.
Diffstat (limited to 'async/src/async.h')
-rw-r--r--async/src/async.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/async/src/async.h b/async/src/async.h
index d6a74c0..18b5979 100644
--- a/async/src/async.h
+++ b/async/src/async.h
@@ -514,7 +514,11 @@ private:
514 // copy by value is const 514 // copy by value is const
515 auto outFuture = future; 515 auto outFuture = future;
516 Async::detail::copyFutureValue(watcher->future(), outFuture); 516 Async::detail::copyFutureValue(watcher->future(), outFuture);
517 outFuture.setFinished(); 517 if (watcher->future().errorCode()) {
518 outFuture.setError(watcher->future().errorCode(), watcher->future().errorMessage());
519 } else {
520 outFuture.setFinished();
521 }
518 delete watcher; 522 delete watcher;
519 }); 523 });
520 watcher->setFuture(job.exec(in ...)); 524 watcher->setFuture(job.exec(in ...));