+ (if (message-needs-reply? original-message)
+ (wait-maybe-handle-errors
+ (send-message '() (%current-actor)
+ (message-from original-message) '*reply*
+ original-message #t message-body-args))
+ #f))
+
+(define (<-reply-wait* send-options original-message
+ . message-body-args)
+ "Like <-reply-wait, but allows extra parameters via send-options"
+ (define* (really-send #:key (actor (%current-actor))
+ #:allow-other-keys)
+ (apply wait-maybe-handle-errors
+ (send-message send-options actor
+ (message-from original-message) '*reply*
+ original-message #t message-body-args)
+ send-options))
+ (when (message-needs-reply? original-message)
+ (apply really-send send-options)))
+
+(define* (wait-maybe-handle-errors message
+ #:key accept-errors
+ #:allow-other-keys)
+ "Before returning a message to a waiting caller, see if we need to
+raise an exception if an error."
+ (define action (message-action message))
+ (cond ((and (eq? action '*error*)
+ (not accept-errors))
+ (throw 'hive-unresumable-coroutine
+ "Won't resume coroutine; got an *error* as a reply"
+ #:message message))
+ (else message)))