From 3ef3131c32b61acd9713592eafa3536308191205 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 24 Jul 2023 08:40:07 +0100 Subject: Report backtraces in the state channel --- bffe/server.scm | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'bffe') diff --git a/bffe/server.scm b/bffe/server.scm index 1bbbe67..c725d2f 100644 --- a/bffe/server.scm +++ b/bffe/server.scm @@ -152,16 +152,20 @@ exn)) #f) (lambda () - (let ((response - body - (http-get* - (string->uri - (string-append event-source "/state"))))) - (let ((state - (json->scm body))) - (put-message reply-channel - state) - state))) + (with-throw-handler #t + (lambda () + (let ((response + body + (http-get* + (string->uri + (string-append event-source "/state"))))) + (let ((state + (json->scm body))) + (put-message reply-channel + state) + state))) + (lambda _ + (backtrace)))) #:unwind? #t))) (if new-state (loop (time-second (current-time)) -- cgit v1.2.3