fixed bug 403, added logging to tcp and email
[org.ibex.core.git] / src / org / ibex / js / JS.java
index 3158851..9aa5606 100644 (file)
@@ -9,6 +9,8 @@ import java.util.*;
 /** The minimum set of functionality required for objects which are manipulated by JavaScript */
 public class JS extends org.ibex.util.BalancedTree { 
 
+    public static boolean checkAssertions = false;
+
     public static final Object METHOD = new Object();
     public final JS unclone() { return _unclone(); }
     public Enumeration keys() throws JSExn { return entries == null ? emptyEnumeration : entries.keys(); }
@@ -130,7 +132,7 @@ public class JS extends org.ibex.util.BalancedTree {
             if((int)d == d) return Integer.toString((int)d);
             return o.toString();
         }
-        throw new RuntimeException("can't coerce that!");
+        throw new RuntimeException("can't coerce "+o+" [" + o.getClass().getName() + "]");
     }
 
     // Instance Methods ////////////////////////////////////////////////////////////////////