GNU bug report logs -
#33407
Cuirass is dropping the SQLite error message when rethrowing
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33407 in the body.
You can then email your comments to 33407 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#33407
; Package
guix
.
(Fri, 16 Nov 2018 17:45:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Fri, 16 Nov 2018 17:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[Message part 2 (application/pgp-signature, inline)]
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Fri, 16 Nov 2018 20:53:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
:
bug acknowledged by developer.
(Fri, 16 Nov 2018 20:53:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 33407-done <at> debbugs.gnu.org (full text, mbox):
Hello,
Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de> skribis:
> 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"
Oops, good catch! Fixed in commit
d0ed3341d7201d0332e9aeb0af80e0ec635aeb1e.
I also factorized the exception handler in the previous commit because
there were 3 copies of this bug…
Thanks!
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#33407
; Package
guix
.
(Fri, 16 Nov 2018 21:15:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 33407-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, 16 Nov 2018 21:51:49 +0100
ludo <at> gnu.org (Ludovic Courtès) wrote:
> Hello,
>
> Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de> skribis:
>
> > 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"
>
> Oops, good catch! Fixed in commit
> d0ed3341d7201d0332e9aeb0af80e0ec635aeb1e.
>
> I also factorized the exception handler in the previous commit because
> there were 3 copies of this bug…
That's quick. Thank you,
Björn
[Message part 2 (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 15 Dec 2018 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.