20.5 Summary
In this chapter, we covered the following:
We described how to define condition classes, and to signal them.
We explored establishing simple error handlers using the
exceptionclause ofblock.We showed how to design and implement a introspective recovery protocol using
let handler,do-handler, and restarts.We demonstrated how a handler can simply return to the signaler with cooperation from that signaler.
We showed how we can protect sections of code from unexpected nonlocal exits by using the
cleanupclause provided byblock.
You can use these techniques to control the handling of exceptional situations when they arise. By designing your condition classes carefully and handling those conditions correctly, you make your program significantly more robust, without interrupting the normal flow of control. By providing recovery protocols, you make it possible to continue cleanly after a problem has been detected. By protecting critical code against unexpected nonlocal exits, you enhance the reliability of your applications.




