I want to create a function that takes a variable of an error-kit
error type and inserts it into a handle statement, but when I try, I
get a strange error. What does the error mean, and is there a way to
pass a variable error type into a handle statement without resorting
to macros?
Clojure 1.0.0-
user=> (use 'clojure.contrib.error-kit)
nil
user=> (deferror parse-error [] []
{:msg "WHEEE", :unhandled (throw-msg IllegalArgumentException)})
#'user/parse-error
user=> (defn a [error-type]
(with-handler
(raise parse-error)
(handle error-type [x] x)))
java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.RuntimeException: java.lang.Exception: Assert failed: v
(NO_SOURCE_FILE:13)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---