From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 67862@debbugs.gnu.org, Christian Ohler <ohler@gnu.org>
Subject: bug#67862: 30.0.50; Handler-bind and ert-test-error-debug
Date: Sun, 17 Dec 2023 10:08:41 -0500 [thread overview]
Message-ID: <jwv4jggyij6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m2ttoh5ngn.fsf@Pro.fritz.box> ("Gerd Möllmann"'s message of "Sun, 17 Dec 2023 07:53:44 +0100")
>> (ert-deftest ert-test-error-debug ()
>> (let ((test (make-ert-test :body (lambda () (error "Error message")))))
>> (condition-case condition
>> (progn
>> (let ((ert-debug-on-error t))
>> (ert-run-test test))
>> (cl-assert nil))
>> ((error)
>> (cl-assert (equal condition '(error "Error message")) t)))))
>>
>> Until now, this test passes just like that, i.e. without entering
>> the debugger. With the new code, this test does enter the debugger.
>>
>> Can anyone give me a hand figuring out why/how the debugger is not entered
>> with the current code?
>
> Could that be from the condition-case that the test puts around the
> ert-run-test? Like in
>
> (condition-case var
> (let ((debug-on-error t))
> (error "error"))
> (error "no debugger"))
Duh! Thanks Gerd for making me see the obvious.
Stefan
next prev parent reply other threads:[~2023-12-17 15:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-17 0:37 bug#67862: 30.0.50; Handler-bind and ert-test-error-debug Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-17 6:53 ` Gerd Möllmann
2023-12-17 15:08 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-12-26 16:25 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-26 18:00 ` Gerd Möllmann
2023-12-31 19:43 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-01 5:56 ` Gerd Möllmann
2024-01-01 12:15 ` Eli Zaretskii
2024-01-01 16:43 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-01 22:27 ` J.P.
2024-02-02 2:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-02 23:28 ` J.P.
2024-02-02 23:44 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv4jggyij6.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=67862@debbugs.gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=ohler@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.