Error messages
The error messages provide helpful information about errors in your uLisp program.
Layout of error messages
Each error message can consists of up to four components:
- Backtrace is the sequence of function calls that led to the error.
- Context is the name of the built-in or user-defined function in which the error occurred.
- Message is the explanation of the error.
- Value is the value causing the error.
The Backtrace field is only shown if the backtrace was previously enabled by calling:
(backtrace t)
The Context field is omitted if there's no appropriate context; for example:
> #! Error: illegal character after #
It's also not possible to give a context if the error occurs in a function supplied to another function; for example:
> (mapc (lambda (x y) (cons x y)) '(a b c)) Error: function has too few arguments
The Value field is omitted if there's no appropriate value to show; for example:
> (cons 2) Error: 'cons' has too few arguments
Errors from the format function
The format function has a special layout of error messages, to show the directive in the format string that caused the error; for example:
> (format t "The result is ~a ~q" 42) The result is 42 "The result is ~a ~q" ^ Error: 'format' invalid directive
Here are the specific error messages that can occur with the format function:
argument is not a list
The argument for a ~{ directive is not a list.
can't nest ~{
Currently uLisp only supports one level of ~{ … ~}.
invalid directive
The directive is either invalid or not supported by uLisp.
missing argument
The argument for a directive is missing.
no matching ~{
A ~} directive has been encountered without an opening ~{.
quote not valid
A quote can only appear after a comma.
Alphabetical list of error messages
For a list of all the error messages, in alphabetical order, with an explanation of the message, and if appropriate an example that would generate the error, see List of error messages.