aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-02-03 12:52:53 +0000
committerChristopher Baines <mail@cbaines.net>2021-02-03 12:53:53 +0000
commit570c66722206951f55ab888aeaf0209b6d3bb822 (patch)
treec67d69037f85eea97d485afa0a3eeb198ec4144f
parent481b1c186f04785a889d481aabc83d29fdea6200 (diff)
downloaddata-service-570c66722206951f55ab888aeaf0209b6d3bb822.tar
data-service-570c66722206951f55ab888aeaf0209b6d3bb822.tar.gz
Tweak exception handling when loading revisions
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm17
1 files 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