From 570c66722206951f55ab888aeaf0209b6d3bb822 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 3 Feb 2021 12:52:53 +0000 Subject: Tweak exception handling when loading revisions --- guix-data-service/jobs/load-new-guix-revision.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index 0e051f4..21ce9be 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -1790,27 +1790,26 @@ SKIP LOCKED") id commit source) (if (eq? - (with-time-logging (string-append "loading revision " commit) + (with-time-logging (string-append "processing revision " commit) (setup-logging id (lambda () (with-exception-handler (const #f) (lambda () - (with-exception-handler - (lambda (exn) - (simple-format (current-error-port) - "error: load-new-guix-revision: ~A\n" - exn) - (backtrace) - #f) + (with-throw-handler #t (lambda () (with-store-connection (lambda (store) (load-new-guix-revision conn store git-repository-id - commit)))))) + commit)))) + (lambda (key . args) + (simple-format (current-error-port) + "error: load-new-guix-revision: ~A ~A\n" + key args) + (backtrace)))) #:unwind? #t)))) #t) (begin -- cgit v1.2.3