From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#24402: should-error doesn't catch all errors Date: Wed, 12 Jul 2017 08:30:56 -0400 Message-ID: <87tw2het1b.fsf@users.sourceforge.net> References: <3654D8E9-D3CB-402B-922F-B132C1871E9F@runbox.com> <596E65D2-E780-43A1-A75B-603B61B6F9F4@runbox.com> <87zickhoco.fsf_-_@lylat> <877eznda7v.fsf@lylat> <874lur0zki.fsf@calancha-pc> <87o9sywtbz.fsf@lylat> <87fue3f9p8.fsf@users.sourceforge.net> <87vamyl3j3.fsf@lylat> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499862618 2176 195.159.176.226 (12 Jul 2017 12:30:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Jul 2017 12:30:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: Gemini Lasswell , 24402@debbugs.gnu.org, Tino Calancha To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 12 14:30:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVGmT-0000KL-5J for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jul 2017 14:30:13 +0200 Original-Received: from localhost ([::1]:52495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVGmY-0005sg-Iz for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jul 2017 08:30:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVGmP-0005ps-4S for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 08:30:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVGmJ-0002jv-Bl for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 08:30:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60426) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVGmJ-0002jW-8U for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 08:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVGmJ-0000Yf-3V for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 08:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jul 2017 12:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24402 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed patch Original-Received: via spool by 24402-submit@debbugs.gnu.org id=B24402.14998625702078 (code B ref 24402); Wed, 12 Jul 2017 12:30:03 +0000 Original-Received: (at 24402) by debbugs.gnu.org; 12 Jul 2017 12:29:30 +0000 Original-Received: from localhost ([127.0.0.1]:34870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVGlm-0000XS-Fz for submit@debbugs.gnu.org; Wed, 12 Jul 2017 08:29:30 -0400 Original-Received: from mail-io0-f170.google.com ([209.85.223.170]:35945) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVGll-0000XH-J1 for 24402@debbugs.gnu.org; Wed, 12 Jul 2017 08:29:29 -0400 Original-Received: by mail-io0-f170.google.com with SMTP id z62so11580954ioi.3 for <24402@debbugs.gnu.org>; Wed, 12 Jul 2017 05:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=9Rh5L6LMmIuigdLufWoRQTiP+ct7wxgVhBJdhGfvO7Q=; b=p7UJBJBu7Ep6yjGfk3X/f6jhr/VDQAV0wBv+bsP/EXCsSzLAmq5KZmMraVNlkm6sAy 6cfc9VDAo6Kl2fDzp2gPvoy26hImzcvH1HaGvPm8q0wR+xvjZyoqTL7k6kkT78Wjfqx2 iycsvSteXKoOtN7V53Ug07ltBJNlA9yBAoz8+VL3mFQYG1QvCuAdX6Ks5CpaXsieRmun qaDYdTIg//sR/G5w5XJ8IM/JL/1VnzWHK4/+rfLhUPBI0dTjWmFmIgAa9FZnaU5orjfN EXRvBLjHZ253KV5zIYF34tXLvELBZXGPXbGVkJZTnbAHysTlgWV96mVWcoP07ydzxQWw gviw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=9Rh5L6LMmIuigdLufWoRQTiP+ct7wxgVhBJdhGfvO7Q=; b=tZYhSWhvUEPuf5V77IyM+NpSNxhmtsiRjNL2kSCQWwtbiaBrAvYlJi3ZVzO9GbmMXp +kLgAuqkb/cTCaRuuQbCkRy17AqchMHy5/7Mo9I8RCdhFGKlTfPZ65JKOwxgSrQl36iu L8kxBiKJXZuH5DwO3QSCCM01vQcZbKJQbvoH0ATog80QZlf2RfQBO8/g8HZVkL9JojiK t2fMHfUafckK/yMvXTQ1YWz6iIP4F5nWQ/N8pPyfRHLfcosojv9vYcsv/Z9cVBY0xKfj Lr9GETAlheXNIo3WPt5mbigg7N3kvf0KqiJASNjHYaIntEQkblQ4ofBFxyjwGXUZQ5nT bltA== X-Gm-Message-State: AIVw113Sg3UyOtI7Qt7MK+NZG2if4bh5joNCiS0BCU6i4d/SyaIrtfSP HeDXVS9ZTsEjAA== X-Received: by 10.107.46.230 with SMTP id u99mr4894545iou.52.1499862563920; Wed, 12 Jul 2017 05:29:23 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id c4sm1451642ioc.18.2017.07.12.05.29.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jul 2017 05:29:23 -0700 (PDT) In-Reply-To: <87vamyl3j3.fsf@lylat> (Alex's message of "Tue, 11 Jul 2017 21:47:44 -0600") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134454 Archived-At: Alex writes: > npostavs@users.sourceforge.net writes: > >> Yes, ert binds `debugger' in order to get full backtrace information >> when there is an error. This means it won't see errors caught by >> condition-case. That's good when it ignores errors caught by test code >> using condition-case, but does give rise to problems. There is some >> relevant discussion in Bugs #11218 and #24617. >> >> Espcially the suggestion in #24617 of using `signal-hook-function' to >> record error info instead of using `debugger', I think doing this could >> simplify things a lot. It is definitely going to require messing around >> with ert's internals though... > > Thanks for the info. I may have discovered a workaround, but I'm not > sure if there's any negative side-effects. All the tests pass, though. > > What do you think of it? It's obviously not ideal, but I think it at > least fixes the issues at hand. Does it also work when loading the elc version of the test file? (try 'make check TEST_LOAD_EL=no') What about tests like this? (ert-deftest check-error-handling () (should (eq 42 (condition-case () (/ 1 0) (arith-error 42)))))