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 18:43:51 +0100 Message-ID: <20181116184351.5ce7bc8b@alma-ubu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/X_gOtcwwiwEE1j3UzqUGYFk"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNiB3-0004Nc-Bb for bug-guix@gnu.org; Fri, 16 Nov 2018 12:45:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNiAw-0006ZI-AO for bug-guix@gnu.org; Fri, 16 Nov 2018 12:45:09 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:52467) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gNiAw-0006Z8-7d for bug-guix@gnu.org; Fri, 16 Nov 2018 12:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gNiAw-0002n4-59 for bug-guix@gnu.org; Fri, 16 Nov 2018 12:45:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNi9w-0004A5-Ox for bug-guix@gnu.org; Fri, 16 Nov 2018 12:44:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNi9q-0005d2-P5 for bug-guix@gnu.org; Fri, 16 Nov 2018 12:44:00 -0500 Received: from m4s11.vlinux.de ([83.151.27.109]:49968 helo=bjoernhoefling.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNi9q-0005cX-IR for bug-guix@gnu.org; Fri, 16 Nov 2018 12:43:54 -0500 Received: from alma-ubu (p508AC390.dip0.t-ipconnect.de [80.138.195.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by bjoernhoefling.de (Postfix) with ESMTPSA id E10FC40180 for ; Fri, 16 Nov 2018 18:43:52 +0100 (CET) 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: 33407@debbugs.gnu.org --Sig_/X_gOtcwwiwEE1j3UzqUGYFk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 () ) (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" 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=C3=B6rn --Sig_/X_gOtcwwiwEE1j3UzqUGYFk Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlvvAdgACgkQvyhstlk+X/3gXwCeIH6wrqVYnDqi6eawGPvSGEEb xPsAoJ0S14nXp1/8L1d3ddSAMwG6gyLT =D1Aa -----END PGP SIGNATURE----- --Sig_/X_gOtcwwiwEE1j3UzqUGYFk--