Reject invalid error symbols (Bug#76447)

* src/eval.c (signal_or_quit): Signal an error if 'signal' gets called
with an invalid error symbol.
This commit is contained in:
Stefan Monnier 2025-08-17 16:48:35 +02:00 committed by Philipp Stephani
parent 1f4e2e8264
commit 888dc2a0b5

View file

@ -1948,6 +1948,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,