util/error.lsp [src]
Error-handling functions
(assert expr)
Throws an error if EXPR evaluates to nil
If *assert-return-error* is non-nil, return the error string rather than
throwing. Otherwise, returns the value of EXPR.
NO-FUNC-NAME
(assert-all expr-lst)
assert all expressions in EXPR-LST. If no errors, return a list of results
If *ASSERT-RETURN-ERROR* is non-nil, catch the errors and return them as a list. If there
were no errors in this case, return nil.
NO-FUNC-NAME
(catch-all-error attempt)
Wrapper for vl-catch-all-error-message
This function returns *last-error* as the error message if the error was a quit/exit (which should indicate we threw it using error).
(debug-print msgs)
Prints debug messages when *dev-mode* is non-nil
MSGS is a list of things that will be macro-expand'd, turned into strings, concatenated,
and printed to console. A newline will be added to the front of the resulting string
automatically.
(debug-print-vars vars)
Uses debug-print to print symbol values
VARS should be a list of symbols. Example use:
(setq *dev-mode* t a 1 b 2)
(debug-print-vars '(a b))
prints
A: 1
B: 2
NO-FUNC-NAME
(error msg)
Calls *error* if defined, prints MSG, and exits
If *error-prefix* is defined, it is used as the message prefix. Otherwise, the default
[Error] is used.