aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-02-14 09:57:40 +0000
committerChristopher Baines <mail@cbaines.net>2021-02-14 09:57:56 +0000
commite6b03f55397f0f7d68624b531eea736d8be5f31e (patch)
tree71fecb94190aa939bb5f9c2204a68e3d4df5cb3b /guix-build-coordinator
parente4349a3c26b1243a274d298c5e259566a5cb0a52 (diff)
downloadbuild-coordinator-e6b03f55397f0f7d68624b531eea736d8be5f31e.tar
build-coordinator-e6b03f55397f0f7d68624b531eea736d8be5f31e.tar.gz
Show backtraces upon hook errors
This might not be helpful, but I think it's still worth trying, even if all the line numbers are within Guile itself...
Diffstat (limited to 'guix-build-coordinator')
-rw-r--r--guix-build-coordinator/coordinator.scm18
1 files changed, 11 insertions, 7 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index 26292dc..c66b9fe 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -549,13 +549,17 @@
(log-msg (build-coordinator-logger build-coordinator)
'DEBUG
"processing " event " event: " arguments)
- (call-with-duration-metric
- (build-coordinator-metrics-registry build-coordinator)
- "hook_duration_seconds"
- (lambda ()
- (apply handler build-coordinator arguments))
- #:labels '(event)
- #:label-values `((event . ,event)))
+ (with-throw-handler #t
+ (lambda ()
+ (call-with-duration-metric
+ (build-coordinator-metrics-registry build-coordinator)
+ "hook_duration_seconds"
+ (lambda ()
+ (apply handler build-coordinator arguments))
+ #:labels '(event)
+ #:label-values `((event . ,event))))
+ (lambda _
+ (backtrace)))
(log-msg (build-coordinator-logger build-coordinator)
'DEBUG
event " handler finished")