O'Reilly logo

Common Lisp Recipes: A Problem-Solution Approach by Edmund Weitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12. Error Handling and Avoidance

Errors happen. There’s no magic bullet that’ll help you to avoid all errors your code could possibly ever encounter. But you can, of course, try to program defensively and anticipatory so that typical errors are noticed early and avoided before they can harm you. And you can be prepared to handle those errors that can’t be avoided.

Many modern programming languages nowadays include facilities for structured exception handling and COMMON LISP is no exception (pun intended).1 But it is different from many other languages in that it

  1. generalizes exceptions through its hierarchy of conditions,
  2. doesn’t necessarily unwind the stack if an exception occurs, and
  3. offers restarts to programmatically continue “where the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required