From 80ab8e20cc38c50001521f0212598dd0145b0b59 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 11 Dec 2015 17:50:55 +1300 Subject: [PATCH] Avoid crashing trace when behavior or state are missing from relevant tables --- prospect/trace/stderr.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prospect/trace/stderr.rkt b/prospect/trace/stderr.rkt index b5dd399..51de7c3 100644 --- a/prospect/trace/stderr.rkt +++ b/prospect/trace/stderr.rkt @@ -198,8 +198,8 @@ (define newpid (mux-next-pid (world-mux old-w))) (define newpidstr (format-pids (cons newpid (cdr pids)))) ;; replace parent pid (define interests (mux-interests-of (world-mux new-w) newpid)) - (define behavior (hash-ref (world-behaviors new-w) newpid)) - (define state (hash-ref (world-states new-w) newpid)) + (define behavior (hash-ref (world-behaviors new-w) newpid '#:missing-behavior)) + (define state (hash-ref (world-states new-w) newpid '#:missing-state)) (with-color BRIGHT-GREEN (output "~a ~v spawned from ~a (~a total processes now)\n" newpidstr