On Aug 2, 8:39 am, Ken Wesson <kwess...@gmail.com> wrote:
> It is true that the messages commonly encountered could stand to be
> better documented on a Clojure site. I'm wondering if we could go
> further, though, and make REPL exception printing more informative.
> The Java exception gets stored in *e, so someone can always type *e to
> retrieve it, or (.printStackTrace *e), etc., so printing an
> interpretation of the exception wouldn't render the raw exception
> inaccessible.
I've worked on a fork of Clojure that tries to do this: 
http://github.com/qbg/clojure

The solution I've implemented is to rewrite the exception as something
like:
java.lang.ClassCastException: A function (user/fac) cannot be used as
a number (java.lang.Number)

I've found for ClassCastExceptions, this is usually easy. For most
other types of exceptions, it is very difficult.

-- 
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