[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11218: with-demoted-errors use of condition-case-unless-debug; ert

From: Noam Postavsky
Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert
Date: Tue, 14 Aug 2018 21:10:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Christian Ohler <address@hidden> writes:

> On 4/13/12 6:44 AM, Stefan Monnier wrote:
>>>>> If you replace with-demoted-errors with ignore-errors, the test passes.
>>>> Looks like a bug in ERT.
>>> I don't know if it's a "bug" per se...
>>> ert--run-test-internal binds debug-on-error to t, and redefines the
>>> debugger to ert--run-test-debugger. As the doc of that function says:
>> I wonder why ERT doesn't just use condition-case to catch and record
>> the errors.
> Two reasons that I remember off the top of my head: Recording
> backtraces, and recording additional information provided with
> `ert-info'.  Using condition-case would let ERT regain control only
> after the stack is unwound, at which point that information is gone.

I just posted a patch which changes ERT to use `signal-hook-function' to
record backtraces instead.  It fixes the case in the OP.


Note that condition-case also needs an enhancement to be able to catch
any signal (Bug#24618), so that might be a third reason why ERT didn't
go this route originally.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]