From: Jan (janneke) Nieuwenhuizen Date: Sat, 7 Nov 2020 09:45:32 +0000 (+0100) Subject: agenda: Handle wrong-type-arg in select. X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=8743a3618ef6fc17bec6c3d208b98d3cd6701da1;p=8sync.git agenda: Handle wrong-type-arg in select. This fixes Backtrace: 10 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 9 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 8 (_ #(#(#))) In ice-9/boot-9.scm: 2312:4 7 (save-module-excursion _) 3832:12 6 (_) In 8sync/actors.scm: 812:6 5 (run-hive #< 7fca5d977190> _ #:cleanup _ #:handle-signals _) In ice-9/control.scm: 91:24 4 (call-with-escape-continuation _) In 8sync/agenda.scm: 569:6 3 (run-agenda #< queue: (() . #f) prompt-tag: ("prompt") read-port-map: # …) 470:7 2 (update-agenda-from-select! #< queue: (() . #f) prompt-tag: ("prompt") read-port-map: #) In ice-9/boot-9.scm: 829:9 1 (catch system-error # # …) In unknown file: 0 (select (# #) (#) # …) ERROR: In procedure select: In procedure select: Wrong type argument in position 1: # * 8sync/agenda.scm (update-agenda-from-select!): Catch everything. --- diff --git a/8sync/agenda.scm b/8sync/agenda.scm index e91487e..c3859d0 100644 --- a/8sync/agenda.scm +++ b/8sync/agenda.scm @@ -467,7 +467,7 @@ Also handles sleeping when all we have to do is wait on the schedule." ;; TODO: support usecond wait time too (match (get-wait-time) ((sec . usec) - (catch 'system-error + (catch #t ; expect: wrong-type-arg (open port), system-error (lambda () (select (hash-keys (agenda-read-port-map agenda)) (hash-keys (agenda-write-port-map agenda))