[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24402: should-error doesn't catch all errors
From: |
npostavs |
Subject: |
bug#24402: should-error doesn't catch all errors |
Date: |
Wed, 12 Jul 2017 08:30:56 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
Alex <agrambot@gmail.com> 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)))))
- bug#24402: should-error doesn't catch all errors (Was:bug#24402: More Information), Alex, 2017/07/03
- bug#24402: should-error doesn't catch all errors, Alex, 2017/07/04
- bug#24402: should-error doesn't catch all errors, Tino Calancha, 2017/07/05
- bug#24402: should-error doesn't catch all errors, npostavs, 2017/07/11
- bug#24402: should-error doesn't catch all errors, Alex, 2017/07/11
- bug#24402: should-error doesn't catch all errors,
npostavs <=
- bug#24402: should-error doesn't catch all errors, Alex, 2017/07/12
- bug#24402: should-error doesn't catch all errors, npostavs, 2017/07/12
- bug#24402: should-error doesn't catch all errors, Alex, 2017/07/12
- bug#24402: should-error doesn't catch all errors, npostavs, 2017/07/12
- bug#24402: should-error doesn't catch all errors, Alex, 2017/07/13
- bug#24402: should-error doesn't catch all errors, npostavs, 2017/07/13
- bug#24402: should-error doesn't catch all errors, Alex, 2017/07/14
- bug#24402: should-error doesn't catch all errors, Alex, 2017/07/14
- bug#24402: should-error doesn't catch all errors, npostavs, 2017/07/15
- bug#24402: should-error doesn't catch all errors, Alex, 2017/07/15