aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-09-18 20:19:03 +0100
committerChristopher Baines <mail@cbaines.net>2020-09-18 20:19:03 +0100
commite0b36b12d7a4ca1a4a105c5f57a3a416585619e2 (patch)
tree228d535a90ccb3fe4cab90ad1b37602924d5fdd9
parentf817241a596f35b9c4985a61ceea24e5f645a5cf (diff)
downloadbuild-coordinator-e0b36b12d7a4ca1a4a105c5f57a3a416585619e2.tar
build-coordinator-e0b36b12d7a4ca1a4a105c5f57a3a416585619e2.tar.gz
Work around Guile not printing backtraces without failing
For some exceptions raised in worker threads, seemingly those that come from guile-sqlite3, Guile can't print the backtrace without erroring itself [1]. Work around Guile not being helpful by just printing out the backtrace, that Guile may fail to print, after the details of the exception. At least then there's something informative in the output. 1: In procedure string->number: Wrong type argument in position 1 (expecting string): #f
-rw-r--r--guix-build-coordinator/utils.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm
index 974316f..e9b7ad8 100644
--- a/guix-build-coordinator/utils.scm
+++ b/guix-build-coordinator/utils.scm
@@ -90,10 +90,10 @@ arguments of the worker thread procedure."
(lambda ()
(with-exception-handler
(lambda (exn)
- (backtrace)
(simple-format
(current-error-port)
"worker-thread: exception: ~A\n" exn)
+ (backtrace)
(raise-exception exn))
(lambda ()
(call-with-values