a) "In function COS, value of argument is" -- Isn't there something
missing in that part of the error message?
b) (length 12) does not give such an informative error message, just a
boring "is not of type SEQUENCE"
What about the example below? I have created a function, FEwrong_type_nth_arg(), that outputs better error messages and register the calling function with a debugger frame, in case it was not already there. This way the message is nicer and the function appears in backtraces. I will commit it once I finish testing it.
> (cos 'a)
In function COS, the value of the first argument is
which is not of the expected type NUMBER
1. (RESTART-TOPLEVEL) Go back to Top-Level REPL.
Broken at COS.
Local variables: none
Special variables: none
> si:bytecodes [Evaluation of: (cos 'a)]