[Top][All Lists]

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

Does wrong_type_argument return or not?

From: Kim F. Storm
Subject: Does wrong_type_argument return or not?
Date: 22 Feb 2002 14:31:26 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

According to the doc string, Fsignal does not return, so
neither does wrong_type_argument.  However, looking at
Fsignal, it can return -- and the code in wrong_type_argument
definitely expects this to happen, so it can itself return
a (valid) value.

And code generally seems to expect wrong_type_argument to
return a valid value for the data which was signalled as

However, in many places, the code does not seem to expect
wrong_type_argument to return.  

Some examples:

In data.c, Fsubr_arity and Fsubr_interactive_form both call
wrong_type_argument if the arg is not a SUBRP, but then continues
accessing it like that anyway (in case wrong_type_argument does

In fns.c, concat doesn't use the return value from wrong_type_argument
(so why chekc and call it, if the errors it reports cannot happen?).

In syntax.c, check_syntax_table may call wrong_type_argument
in case of an error, but it doesn't return a value.  And
looking at the callers of check_syntax_table, I don't think
they expect it to return in case of an error.

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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