From e6b03f55397f0f7d68624b531eea736d8be5f31e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 14 Feb 2021 09:57:40 +0000 Subject: 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... --- guix-build-coordinator/coordinator.scm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'guix-build-coordinator/coordinator.scm') 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") -- cgit v1.2.3