Custom Exceptions in Clojure?

前端 未结 3 2022
醉话见心
醉话见心 2021-02-02 06:11

I\'ve been trying to create a user-defined exception in Clojure, and have been having all sorts of problems. I tried the method outlined here:

http://en.wikibooks.org/w

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-02 06:32

    FWIW, unless you are creating a custom exception for interop reasons you may want to consider using clojure.contrib.condition instead. It comes with a precompiled custom exception that you piggy-back custom data onto using it's API. I've been able to avoid creating many custom exceptions by using it instead. The docs are here: http://clojure.github.com/clojure-contrib/condition-api.html

提交回复
热议问题