Kill a process on non-#f, non-transition result from behavior

This commit is contained in:
Tony Garnock-Jones 2013-10-28 11:12:40 +00:00
parent f8f31e7355
commit 371dbef54e
1 changed files with 6 additions and 1 deletions

View File

@ -117,7 +117,12 @@
(lambda (exn)
(log-error "Process ~a died with exception:\n~a" pid (exn->string exn))
(transition (process-state p) (list (quit))))])
((process-behavior p) e (process-state p))))
(match ((process-behavior p) e (process-state p))
[#f #f]
[(? transition? t) t]
[x
(log-error "Process ~a returned non-#f, non-transition: ~v" pid x)
(transition (process-state p) (list (quit)))])))
(define (apply-transition pid t w)
(match t