Hi group,
I was googling for enumeration of commons runtime errors in clojure,
but i couldnt find anything much.
Stuart Sierra has a couple of blog post on do/donts in clojure, but is not
an exhaustive listing.
I understand that using interop will inherit most of the runtime errors you
can create in java,
but even when staying inside the clojure realm there are some common cases
of errors.
For example,
1 - applying type specific ops on wrong type :
;; math ops.
(+ 1 nil) ; => NullPointerException.
(+ 1 "") ; => ClassCastException.
2 - call on non-callable:
(map nil [1 2 3]) ; => NullPointerException.
("asdf" 2) ; => ClassCastException.
3 - cant destruct
(let [[f s] 1] f) ; => UnsupportedOperationException nth
I guess most of errors are due to bad plumbing.
Do you have any insights on these or more examples?
Bye and Thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
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
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.