diff options
Diffstat (limited to 'guix-build-coordinator/agent-messaging')
-rw-r--r-- | guix-build-coordinator/agent-messaging/http/server.scm | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm index 9d7482c..b55d812 100644 --- a/guix-build-coordinator/agent-messaging/http/server.scm +++ b/guix-build-coordinator/agent-messaging/http/server.scm @@ -409,16 +409,24 @@ port. Also, the port used can be changed by passing the --port option.\n" (call-with-new-thread (lambda () - (set-thread-name "hash output") - (log-msg logger 'DEBUG build-uuid ": computing hash of " filename) - - (put-message - channel - (list 'result - filename - (compute-hash-of-uploaded-output channel - filename - output-filename)))))))) + (with-exception-handler + (lambda (exn) + (put-message channel + (list 'result + filename + exn))) + (lambda () + (set-thread-name "hash output") + (log-msg logger 'DEBUG build-uuid ": computing hash of " filename) + + (put-message + channel + (list 'result + filename + (compute-hash-of-uploaded-output channel + filename + output-filename)))) + #:unwind? #t)))))) (('update filename bytes-processed) (set-hash-progress-bytes-hashed! (hash-ref hash-progress-by-filename filename) |