bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33407: Cuirass is dropping the SQLite error message when rethrowing


From: Björn Höfling
Subject: bug#33407: Cuirass is dropping the SQLite error message when rethrowing
Date: Fri, 16 Nov 2018 18:43:51 +0100

Hi,

is this a bug or by intention?

In src/cuirass/database.scm, in the db-add-* procedures, we have a
catch-clause like this:

(with-db-critical-section db
  (catch 'sqlite-error
    (lambda ()
      <thunk-body>)
    (lambda (key who code message . rest)
        ;; If we get a unique-constraint-failed error, that means we have
        ;; already inserted the same checkout.  That happens for each input
        ;; that doesn't change between two evaluations.
        (if (= code SQLITE_CONSTRAINT_PRIMARYKEY)
            #f
            (apply throw key who code rest))))))
-------------------------------------^

Here the message is not re-thrown.

It would have made my life easier if I saw this message:

  "NOT NULL constraint failed: Builds.system"

instead of just:

In cuirass/utils.scm:
   115:35  0 (_)
cuirass/utils.scm:115:35: Throw to key `sqlite-error' with args `(#f 1299)'.

Addationally, when adding the message to the apply clause, at least in
an isolated test it will be just thrown without problems.

Björn

Attachment: pgpJyCaHkf96s.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]