3 ms·
Error handling is quite different in Common Lisp than in other languages. Assert is also different. An assert has up to three parts: 1. The expression to be as
by dan-robertson 8y ago
Error handling is quite different in Common Lisp than in other languages. Assert is also different. An assert has up to three parts:
1. The expression to be asserted
2. A set of places (ie variables/references)
3. A format datum and arguments (like sprintf)
When an assert fails you see the formatted message from (3) and get some options:
- invoke a restart to some place higher up the control stack
- invoke the restart generated by the assert which asks for new values for the set of places in step 2, and then retries the assert
- abort
- crash
These options may be invoked by the program itself or by the user if the debugger is invoked