On Feb 20, 2011, at 5:27 AM, FD wrote:
> 
> Is there something similar to the lisp macro ignore-errors (http://
> www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/mac_ignore-errors.html)
> 

I use this:

(defmacro ignore-errors
  "Returns the result of evaluating e, or nil if it throws an exception."
  [e]
  `(try ~e (catch java.lang.Exception _# nil)))

 -Lee

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to