*error*

(*error* string)

The *error* function is used to handle errors. A redefinition of this built-in function lets you implement application-specific error handling.

For example, you can make sure that certain system variables are reset if a function is cancelled by the user or an error occurs in your function.

For example, you can make sure that certain command variables are reset if a function is cancelled by the user or an error occurs in your function.

The argument to the function is a string that retrieves the error message passed to the function by the Lisp interpreter.

The built-in routine for error handling is restored by executing the expression:

    (setq *error* nil)

Example

(defun *error* (msg)

  (princ "Error: ")

  (princ msg)

  (princ)

)