A user-definable error-handling function
Supported Platforms: Windows and Mac OS
(*error* string)
Type: String
A textual string that contains a description of the error and is passed by AutoCAD.
Type: N/A
This function does not return, except when using vl-exit-with-value.
If *error* is not nil, it is executed as a function whenever an AutoLISP error condition exists.
Your *error* function can include calls to the command function without arguments (for example, (command)). This will cancel a previous AutoCAD command called with the command function.
The following function does the same thing that the AutoLISP standard error handler does. It prints the text “error: ” followed by a description:
(defun *error* (msg) (princ "error: ") (princ msg) (princ) )