aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix-build-coordinator/coordinator.scm32
1 files changed, 22 insertions, 10 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index 2768a1a..f9f9bf8 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -700,16 +700,28 @@
(map (lambda (build)
(define submit-outputs?
- (let ((hook-result (build-submit-outputs-hook build-coordinator
- (assq-ref build 'uuid))))
- (if (boolean? hook-result)
- hook-result
- (begin
- (log-msg (build-coordinator-logger build-coordinator)
- 'CRITICAL
- "build-submit-outputs hook returned non boolean: "
- hook-result)
- #t))))
+ (with-exception-handler
+ (lambda (exn)
+ (log-msg (build-coordinator-logger build-coordinator)
+ 'CRITICAL
+ "build-submit-outputs hook raised exception: "
+ exn))
+ (lambda ()
+ (with-throw-handler #t
+ (lambda ()
+ (let ((hook-result (build-submit-outputs-hook build-coordinator
+ (assq-ref build 'uuid))))
+ (if (boolean? hook-result)
+ hook-result
+ (begin
+ (log-msg (build-coordinator-logger build-coordinator)
+ 'CRITICAL
+ "build-submit-outputs hook returned non boolean: "
+ hook-result)
+ #t))))
+ (lambda (key . args)
+ (backtrace))))
+ #:unwind? #t))
`(,@build
;; TODO This needs reconsidering when things having been built in