Subject: bug#50629: 28.0.50; hard to debug an uncaught error with ert

From: Gerd Möllmann <[email-masked]>
Date: Sun, 28 Aug 2022 12:31:20 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> Gerd Möllmann <[email-masked]> writes:
>
>> Interestingly with condition-case-unless I get one less error with make
>> check:
>
> Are you sure you removed all the .elc files under test first?  Since
> this is a change in an ert macro, you have to do that to get meaningful
> results.

I did a make -C test clean, but now that you say it I checked, and make
clean does not remove elcs.  Which I personally find surprising.

I'll check with elcs removed between runs later.

> Anyway, that condition-case is presumably there to allow checking for
> failures?  I.e., the :expected stuff.

Ok.

> Instead of altering removing the condition-case there, wouldn't it be
> possible to output the backtrace explicitly in the handler?

You mean the signal-hook-function?  It is invoked, so one can do
something there.  If it would invoke the debugger, that would also work,
I think, but I haven't checked.  Directly outputting something there is
probably not a good idea.  If anything it should record the backtrace in
ERT result structs, like ERT's debugger function.