summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2008-05-16 21:02:21 +0000
committerRich Hickey <richhickey@gmail.com>2008-05-16 21:02:21 +0000
commit1f5e61a179e7d409fcdd39d2bf89979e059acd54 (patch)
tree03dfd2085dd2d13d36a480024074c991fbd913c4
parent11028c5ec854dc1e009f13529aa1f1a924834b17 (diff)
added more descriptive errors for count/nth/seq
-rw-r--r--src/jvm/clojure/lang/RT.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jvm/clojure/lang/RT.java b/src/jvm/clojure/lang/RT.java
index 615cddeb..e2723391 100644
--- a/src/jvm/clojure/lang/RT.java
+++ b/src/jvm/clojure/lang/RT.java
@@ -368,7 +368,7 @@ static public ISeq seq(Object coll){
else if(coll instanceof Enumeration)
return EnumerationSeq.create(((Enumeration) coll));
else
- throw new IllegalAccessError("Don't know how to create ISeq from arg");
+ throw new IllegalAccessError("Don't know how to create ISeq from: " + coll.getClass().getSimpleName());
}
static public ISeq keys(Object coll){
@@ -398,7 +398,7 @@ public static int count(Object o){
return ((Map) o).size();
else if(o.getClass().isArray())
return Array.getLength(o);
- throw new UnsupportedOperationException("count not supported on this type");
+ throw new UnsupportedOperationException("count not supported on this type: " + o.getClass().getSimpleName());
}
static public IPersistentCollection conj(IPersistentCollection coll, Object x){
@@ -586,7 +586,7 @@ static public Object nth(Object coll, int n){
return null;
}
else
- throw new UnsupportedOperationException("nth not supported on this type");
+ throw new UnsupportedOperationException("nth not supported on this type: " + coll.getClass().getSimpleName());
}
static public Object assocN(int n, Object val, Object coll){