Chapter 20Clojure’s Exceptional Handling of Exceptions

by Stuart Halloway

If you don’t know about conditions, you should. Conditions are basically exception handling, but with greater flexibility. Many Lisps feature a condition system, and Clojure is no exception (pun inflicted by editor). Clojure’s condition system is called error-kit. In this chapter, you will learn how to use error-kit, and why you will prefer it to plain old exception handling.

You don’t need to have bought my book[20] to understand this article, but why wouldn’t you want to? ;) You can follow along throughout this article by entering the code at Clojure’s REPL. To install a REPL on your local machine, you can download the sample code from the book. The sample code has ...

Get Functional Programming: A PragPub Anthology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.