Questions about using error-kit

55 views
Skip to first unread message

Thomas Hicks

unread,
Sep 30, 2012, 4:34:01 PM9/30/12
to clo...@googlegroups.com
I'm trying to learn something about error-kit and encountering some unexpected responses, as follows:

Clojure 1.3.0
user=> (use 'clojure.contrib.error-kit)
Warning: *handler-stack* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *handler-stack* or change the name.
Warning: *continues* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *continues* or change the name.
nil
user=> (def tm (throw-msg java.lang.IllegalArgumentException))
#'user/tm
user=> (tm "hi")
IllegalArgumentException   sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)

First, note the dynamic variable warnings upon use...(might this possibly indicate an out-of-date version of error-kit (I'm using using clojure-contrib.jar from 1.2.0)?).

I'm just starting with error-kit but I would have expected that the last call (involving a previous throw-msg function) would have returned something like this:

-> java.lang.IllegalArgumentException: hi

and would not have included the additional junk from 'sun.reflect.NativeConstructor....'. Is this some OSX Java bug or does this also happen on other JDKs?
Any help or suggestions appreciated.
    -t


Mayank Jain

unread,
Sep 30, 2012, 4:36:58 PM9/30/12
to clo...@googlegroups.com

As far as I know contrib is deprecated[1].

Perhaps others can shed more light on your problem.

[1] : dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

Sent from phone. Please excuse brevity.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Softaddicts

unread,
Sep 30, 2012, 4:51:55 PM9/30/12
to clo...@googlegroups.com
Contrib has been separated into separate libs since 1.3

http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

Suggests to use slingshot.

The are 1.3 compliant monolithic contrib versions out there but it's better to move to
the new implementations.

Luc P.
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
Softaddicts<lprefo...@softaddicts.ca> sent by ibisMail from my ipad!

Thomas Hicks

unread,
Sep 30, 2012, 5:29:22 PM9/30/12
to clo...@googlegroups.com
Thanks Luc and Mayank. I will chuck the monolithic contrib lib and check out Slingshot as an error-kit replacement.
    -t
Reply all
Reply to author
Forward
0 new messages