• (throw-msg class-name)
Returns a function that throws a Java Exception with the given
name. Useful to associate a new error-kit error type with a
particular Java Exception class, via the :unhandled error key.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/error_kit.clj:39 top

(defmacro throw-msg
  "Returns a function that throws a Java Exception with the given
  name.  Useful to associate a new error-kit error type with a
  particular Java Exception class, via the :unhandled error key."
  [class-name]
  `(fn [x#] (throw (new ~class-name (:msg x#)))))
Vars in clojure.contrib.error-kit/throw-msg: defmacro apply concat fn list seq vector
Used in 0 other vars

Comments top

No comments for throw-msg. Log in to add a comment.