// Typing Support //////////////////////////////////////////////////////////////////////////////
- public Number coerceToNumber() { throw new JSRuntimeExn("tried to coerce a JavaScript object to a Number"); }
- public String coerceToString() { throw new JSRuntimeExn("tried to coerce a JavaScript object to a String"); }
- public boolean coerceToBoolean() { throw new JSRuntimeExn("tried to coerce a JavaScript object to a Boolean"); }
+ public Number coerceToNumber() { throw new JSRuntimeExn("tried to coerce a JavaScript object of type " +
+ getClass().getName() + " to a Number"); }
+ public String coerceToString() { throw new JSRuntimeExn("tried to coerce a JavaScript object of type " +
+ getClass().getName() + " to a String"); }
+ public boolean coerceToBoolean() { throw new JSRuntimeExn("tried to coerce a JavaScript object of type " +
+ getClass().getName() + " to a Boolean"); }
public String typeName() { return "object"; }