From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Subject: bug#33407: Cuirass is dropping the SQLite error message when rethrowing Date: Fri, 16 Nov 2018 22:14:04 +0100 Message-ID: <20181116221404.25dd0241@alma-ubu> References: <20181116184351.5ce7bc8b@alma-ubu> <874lcgu4nu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/0CWM=HcQpBs2J6dgyFJn5y5"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNlSE-0004qx-Td for bug-guix@gnu.org; Fri, 16 Nov 2018 16:15:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNlSA-00077r-0v for bug-guix@gnu.org; Fri, 16 Nov 2018 16:15:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:52575) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gNlS9-00077L-UV for bug-guix@gnu.org; Fri, 16 Nov 2018 16:15:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gNlS9-0007fv-Le for bug-guix@gnu.org; Fri, 16 Nov 2018 16:15:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <874lcgu4nu.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33407-done@debbugs.gnu.org --Sig_/0CWM=HcQpBs2J6dgyFJn5y5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 16 Nov 2018 21:51:49 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Hello, >=20 > Bj=C3=B6rn H=C3=B6fling skribis: >=20 > > 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 () > > ) > > (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 (=3D 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" =20 >=20 > Oops, good catch! Fixed in commit > d0ed3341d7201d0332e9aeb0af80e0ec635aeb1e. >=20 > I also factorized the exception handler in the previous commit because > there were 3 copies of this bug=E2=80=A6 That's quick. Thank you, Bj=C3=B6rn --Sig_/0CWM=HcQpBs2J6dgyFJn5y5 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlvvMxwACgkQvyhstlk+X/1dgQCfZdSh+SIQmB7b3f199O/XjaXH lfoAnA3/6dv4qIC9WVR8lnRTsaCAVY4A =B3Vk -----END PGP SIGNATURE----- --Sig_/0CWM=HcQpBs2J6dgyFJn5y5--