GNU bug report logs - #70494
[PATCH 00/23] Groundwork for the Guile guix-daemon

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sun, 21 Apr 2024 09:37:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 70494 <at> debbugs.gnu.org, Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>, Tobias Geerinckx-Rice <me <at> tobias.gr>, Ricardo Wurmus <rekado <at> elephly.net>, Christopher Baines <guix <at> cbaines.net>
Subject: [bug#70494] [PATCH 16/23] store: database: Log when aborting transactions.
Date: Thu, 16 May 2024 18:20:40 +0200
Christopher Baines <mail <at> 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).




This bug report was last modified 1 year and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.