summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2017-10-24 16:51:11 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2017-10-24 16:51:11 -0500
commitcd32bbe822f4e3acbb755993d3bd39358c176a26 (patch)
treefc6602db7ac8b9792876f013ceccbd853f7d4956
parente1cc354c7073230398634b1638ea288ce3e27852 (diff)
download8sync-cd32bbe822f4e3acbb755993d3bd39358c176a26.tar.gz
actors: Fix handling errors on resuming.
* 8sync/actors.scm (<-wait): Look at the correct action on the message when checking for error when resuming.
-rw-r--r--8sync/actors.scm5
1 files changed, 1 insertions, 4 deletions
diff --git a/8sync/actors.scm b/8sync/actors.scm
index 8abe41a..b00329d 100644
--- a/8sync/actors.scm
+++ b/8sync/actors.scm
@@ -196,16 +196,13 @@
(big-random-number-string))
#f))
-;; TODO: this should abort to the prompt, then check for errors
-;; when resuming.
-
(define (<-wait to action . args)
(define prompt (*actor-prompt*))
(when (not prompt)
(error "Tried to <-wait without being in an actor's context..."))
(let ((reply (abort-to-prompt prompt '<-wait to action args)))
- (cond ((eq? action '*error*)
+ (cond ((eq? (message-action reply) '*error*)
(throw 'hive-unresumable-coroutine
"Won't resume coroutine; got an *error* as a reply"
#:message reply))