GNU bug report logs -
#76447
29.4; ert-run-tests-batch now aborts if a test signals an undefined error
Previous Next
Full log
View this message in rfc822 format
>> test-2 isn't executed. I think the Emacs 29.4 behavior is more
>> "user-friendly", though this (signaling an error symbol that doesn't
>> derive from 'error') is arguably a corner case.
Indeed, it really should never happen. Similarly `ignore-errors` will
not catch your `foo` signal. I don't think it's a problem in ERT.
But maybe we should make `signal` signal an error if the provided
error-symbol is not a valid error condition symbol, as in the patch below?
>> Probably the behavior change is fallout from switching to handler-bind.
>> To restore the Emacs 29.4 behavior, probably a construct such as
>>
>> (condition-case err
>> (handler-bind ((t ...)) ...)
>> (t ...))
I think `(handler-bind ((t ...)) ...)` would be sufficient, since there
is currently no `condition-case` in the corresponding code.
Stefan
diff --git a/src/eval.c b/src/eval.c
index 5de723cf3bc..6d87d274c31 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1860,6 +1860,8 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool continuable)
}
conditions = Fget (real_error_symbol, Qerror_conditions);
+ if (NILP (conditions))
+ signal_error ("Invalid error symbol", error_symbol);
/* Remember from where signal was called. Skip over the frame for
`signal' itself. If a frame for `error' follows, skip that,
This bug report was last modified 90 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.