[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70494] [PATCH 16/23] store: database: Log when aborting transaction
From: |
Ludovic Courtès |
Subject: |
[bug#70494] [PATCH 16/23] store: database: Log when aborting transactions. |
Date: |
Thu, 16 May 2024 18:20:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Christopher Baines <mail@cbaines.net> skribis:
> Otherwise this has the effect of masking the backtrace/exception.
>
> * guix/store/database.scm (call-with-transaction): Log when aborting.
>
> Change-Id: Iee31905c4688dc62ef37a85b0208fd324ee67d70
> + (with-throw-handler #t
> + (lambda ()
> + (call-with-values proc
> + (lambda vals
> + (sqlite-exec db "commit;")
> + (apply values vals))))
> + (lambda (key args)
> + (simple-format
> + (current-error-port)
> + "transaction aborted: ~A: ~A\n" key args)
> + (backtrace))))
I would just let the sqlite exception through, which should have a
similar effect (Guile will exit and display a backtrace).
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug#70494] [PATCH 16/23] store: database: Log when aborting transactions.,
Ludovic Courtès <=