2003/06/26 00:21:01
[org.ibex.core.git] / src / org / xwt / js / JS.java
index 3c8298f..77d95cc 100644 (file)
@@ -44,7 +44,7 @@ public abstract class JS {
         if (o instanceof String) try { return new Double((String)o); } catch (NumberFormatException e) { return new Double(0); }
         if (o instanceof Boolean) return ((Boolean)o).booleanValue() ? new Long(1) : new Long(0);
         if (o instanceof JS) return ((JS)o).coerceToNumber();
-        throw new Error("toNumber() got object of type " + o.getClass().getName() + " which we don't know how to handle");
+        throw new Error("a " + o.getClass().getName() + " has no numeric value");
     }