From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#33407: Cuirass is dropping the SQLite error message when rethrowing Date: Fri, 16 Nov 2018 21:51:49 +0100 Message-ID: <874lcgu4nu.fsf@gnu.org> References: <20181116184351.5ce7bc8b@alma-ubu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNl6x-0000OB-88 for bug-guix@gnu.org; Fri, 16 Nov 2018 15:53:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNl6v-0003M3-MM for bug-guix@gnu.org; Fri, 16 Nov 2018 15:53:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:52566) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gNl6s-0003KS-9g for bug-guix@gnu.org; Fri, 16 Nov 2018 15:53:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gNl6s-0007AO-7n for bug-guix@gnu.org; Fri, 16 Nov 2018 15:53:02 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <20181116184351.5ce7bc8b@alma-ubu> ("=?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?="'s message of "Fri, 16 Nov 2018 18:43:51 +0100") 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: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Cc: 33407-done@debbugs.gnu.org Hello, Bj=C3=B6rn H=C3=B6fling 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 () > ) > (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 inp= ut > ;; 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" 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=E2=80=A6 Thanks! Ludo=E2=80=99.