The Condition System provided by the Common Lisp is available in runtimes delivered at level 0.
If you deliver at higher levels, then be aware that the full Condition System will not be present by default in your application. If you choose not to retain the full Condition System, you can make use of the more limited, but smaller, error systems available with Delivery. It is useful to make the application handle errors appropriately, because it is generally used by non-Lisp programmers, and it does not have the IDE so it is less easy to debug.
Simplified error handling is still possible in applications without the Condition System. They can only trap conditions of type error or warning. If an application signals any condition other than warning or simple-warning, the condition is categorized as one of type error, and therefore can be trapped.
Condition types are classes like any other class, so may be shaken out. However the code may contain many references to condition types through error calls that are never going to happen in the application. Therefore, there is a special deletion action for conditions, which is controlled by the deliver keywords :condition-deletion-action, :keep-conditions and :packages-to-remove-conditions.
When a condition is deleted (that is when :condition-deletion-action is :delete
), trying to signal it returns a simple-error, which means that it got the wrong type. On the other hand, it has all the information in the format-arguments
slot. If the conditions are redirected (that is, when :condition-deletion-action is :redirect
), a stricter type is returned, but some of the information may be lost, because the condition that it redirects to has fewer slots.
User defined conditions are kept, unless:
:none
, in which case all the conditions are eliminated, or :minimal
, in which case all the user conditions are deleted.
Delivery User Guide - 01 Dec 2021 19:35:04