X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FJS.java;h=de60d0c2797777f81e285441567522256c1fa949;hb=ff2b086d176f8b2323bfd73fb4830cd237b7fa6c;hp=d73b37bb0f21770f6619a47bb0ee6e44b1402557;hpb=3591b88b94a6bb378af3d4abe6eb5233ce583104;p=org.ibex.core.git diff --git a/src/org/ibex/js/JS.java b/src/org/ibex/js/JS.java index d73b37b..de60d0c 100644 --- a/src/org/ibex/js/JS.java +++ b/src/org/ibex/js/JS.java @@ -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(); } @@ -23,7 +25,6 @@ public class JS extends org.ibex.util.BalancedTree { JS _unclone() { return this; } public static class Cloneable extends JS { - public Cloneable() { } public Object jsclone() throws JSExn { return new Clone(this); } @@ -131,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() + "] to type String."); } // Instance Methods ////////////////////////////////////////////////////////////////////