diff options
author | Christopher Baines <mail@cbaines.net> | 2021-01-22 10:01:23 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-01-22 10:01:23 +0000 |
commit | 3673bda6064038bd56469993d4df5487b7054a53 (patch) | |
tree | 2008a6928d566940a2f635d3244e2af037d3c972 /guix-build-coordinator/utils.scm | |
parent | 9e696733ac638acbb3c47197b2484cb6ecbc76a0 (diff) | |
download | build-coordinator-3673bda6064038bd56469993d4df5487b7054a53.tar build-coordinator-3673bda6064038bd56469993d4df5487b7054a53.tar.gz |
Don't use with-exception-handler with (backtrace)
With with-exception-handler being called with #:unwind? #f (implicitly). This
breaks Guile internals used by (backtrace) [1], meaning you get a different
exception/backtrace when Guile itself breaks.
This should avoid the "string->number: Wrong type argument in position
1 (expecting string): #f" exception I've been haunted by for the last year.
1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46009
Diffstat (limited to 'guix-build-coordinator/utils.scm')
-rw-r--r-- | guix-build-coordinator/utils.scm | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index fdcefb6..4d98575 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -646,15 +646,14 @@ References: ~a~%" ;; Add the job back to the queue so that it's tried again (apply process-job job-args)) (lambda () - (with-exception-handler - (lambda (exn) - (simple-format (current-error-port) - "exception when handling job: ~A\n" - exn) - (backtrace) - (raise-exception exn)) + (with-throw-handler #t (lambda () - (apply proc job-args)))) + (apply proc job-args)) + (lambda (key . args) + (simple-format (current-error-port) + "exception when handling job: ~A ~A\n" + key args) + (backtrace)))) #:unwind? #t) (with-mutex queue-mutex (hash-set! running-job-args |