[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67862: 30.0.50; Handler-bind and ert-test-error-debug
From: |
Stefan Monnier |
Subject: |
bug#67862: 30.0.50; Handler-bind and ert-test-error-debug |
Date: |
Sun, 17 Dec 2023 10:08:41 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> (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