I suspect that some routine has an *error* handler but the *error* is not declared like this
(defun c:myfunction(/ var1 var2 *error*)
(defun *error* (msg)
If you see this
(defun c:myfunction(/ var1 var2)
(defun *error* (msg)
Then the regular lisp error handler is displaced and the local one is in charge.
Try loading this:
(defun c:test()
(defun *error* (msg)
(princ "\My Error handler.")
)
(princ)
)
(c:test)
Then at the command prompt enter (/ 2 0)
The division by zero error activates the error handler.
To get rid of the error handler enter (setq *error* nil)
Then try this again (/ 2 0)
So you see the problem is the error handler in charge is doing something to cause another error.
For example if you had a lisp with this error handler
(defun *error* (msg)
(if (not
(member msg '("console break" "Function cancelled" "quit / exit abort" "")))
(princ (strcat "\nError: " msg))
) ; if
(setvar "CMDECHO" usercmd)
(setvar "osmode" useros)
(princ)
) ; end error function
The something other than to routine the activated this error handler caused an error the variables usercmd and useros would likely not exist and therefore would cause an error inside the error handler.
Wew, did you get all that?