The 'error' function allows the generation of a non-correctable error.
A non-correctable error requires evaluation of a
clean-up or
top-level function from within the XLISP
error: err-msg - arg
From within the break-loop, if a continue function is evaluated then a an error message is generated:
error: this error can't be continued
There is no return from the 'error' function.
(error "fee" "fi") ; ERROR generates the message ; error: fee - "fi" (error "can't get" "there") ; ERROR generates the message ; error: Can't get - "there"
Common Lisp: Common Lisp and XLISP have the same basic form and style for 'error'. However, the 'err-msg' string in Common Lisp is sent to the format function. Although, XLISP does have the format function, it does not print the 'err-msg' with format. So, porting from XLISP to Common Lisp will work fine. When porting from Common Lisp to XLISP, you will need to check for this embedded control information in the error messages.
Note: Remember that *breakenable*
needs to be non-NIL for 'error' and
cerror and system errors to be caught by
the normal system
See the
error
function in the