The error handling facilities provided by the Common Lisp and LispWorks-specific Condition System are 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
WARNING. If an application signals any condition other than
SIMPLE-WARNING, the condition is categorized as one of type
ERROR, and therefore can be trapped.
Error conditions that can occur in your application domain can be handled easily enough if you define your own error handling or validation functions to trap them. For instance, you might ordinarily have the following code, which manages an error condition and makes a call to
Suppose your application performs an operation upon a file. The application calls a system function to complete this operation, so when there is no error system, any errors it generates must be caught by the application itself.
In general, the application should not cause Lisp errors. Because it is difficult to ensure that these never happen, it is a good idea for the application to wrap an error handler around all its code. For example:
See Error handling in delivered applications for more information about using this in a delivered application.
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
: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.
LispWorks Delivery User Guide - 15 Feb 2015