all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: 33407@debbugs.gnu.org
Subject: bug#33407: Cuirass is dropping the SQLite error message when rethrowing
Date: Fri, 16 Nov 2018 18:43:51 +0100	[thread overview]
Message-ID: <20181116184351.5ce7bc8b@alma-ubu> (raw)

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

             reply	other threads:[~2018-11-16 17:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 17:43 Björn Höfling [this message]
2018-11-16 20:51 ` bug#33407: Cuirass is dropping the SQLite error message when rethrowing Ludovic Courtès
2018-11-16 21:14   ` Björn Höfling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181116184351.5ce7bc8b@alma-ubu \
    --to=bjoern.hoefling@bjoernhoefling.de \
    --cc=33407@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.