Avoid crashing trace when behavior or state are missing from relevant tables
This commit is contained in:
parent
71c5cd3831
commit
80ab8e20cc
|
@ -198,8 +198,8 @@
|
||||||
(define newpid (mux-next-pid (world-mux old-w)))
|
(define newpid (mux-next-pid (world-mux old-w)))
|
||||||
(define newpidstr (format-pids (cons newpid (cdr pids)))) ;; replace parent pid
|
(define newpidstr (format-pids (cons newpid (cdr pids)))) ;; replace parent pid
|
||||||
(define interests (mux-interests-of (world-mux new-w) newpid))
|
(define interests (mux-interests-of (world-mux new-w) newpid))
|
||||||
(define behavior (hash-ref (world-behaviors new-w) newpid))
|
(define behavior (hash-ref (world-behaviors new-w) newpid '#:missing-behavior))
|
||||||
(define state (hash-ref (world-states new-w) newpid))
|
(define state (hash-ref (world-states new-w) newpid '#:missing-state))
|
||||||
(with-color BRIGHT-GREEN
|
(with-color BRIGHT-GREEN
|
||||||
(output "~a ~v spawned from ~a (~a total processes now)\n"
|
(output "~a ~v spawned from ~a (~a total processes now)\n"
|
||||||
newpidstr
|
newpidstr
|
||||||
|
|
Loading…
Reference in New Issue