throw new JSExn("method not found (" + JS.debugToString(method) + ")");
}
- // FIXME: JSArgs objects, pointers into stack frame
public JS call(JS a0, JS a1, JS a2, JS[] rest, int nargs) throws JSExn {
throw new JSExn("you cannot call this object (class=" + this.getClass().getName() +")");
}
Trap getTrap(JS key) { return null; }
void putTrap(JS key, Trap value) throws JSExn { throw new JSExn("traps cannot be placed on this object (class=" + this.getClass().getName() +")"); }
String coerceToString() throws JSExn { throw new JSExn("can't coerce to a string (class=" + getClass().getName() +")"); }
+ String debugToString() { return "[class=" + getClass().getName() + "]"; }
boolean jsequals(JS o) { return this == o; }
public static class O extends JS {
public static String debugToString(JS o) {
try { return toString(o); }
- catch(JSExn e) { return "[class=" + o.getClass().getName() + "]"; }
+ catch(JSExn e) { return o.debugToString(); }
}
public static boolean isInt(JS o) {