/** log a message with the current JavaScript sourceName/line */
public static void log(Object o, Object message) { log(message); }
public static void log(Object message) { Log.echo(JS.getSourceName() + ":" + JS.getLine(), message); }
+ public static void log(JSExn e) {
+ Log.echo(e,"JS Exception: " + e.getObject() + "\n" + e.backtrace());
+ Log.echo(e,e);
+ }
public static int getLine() {
Interpreter c = Interpreter.current();
/** override and return true to allow placing traps on this object.
* if isRead true, this is a read trap, otherwise write trap
**/
- protected boolean isTrappable(Object name, boolean isRead) { return false; }
+ protected boolean isTrappable(Object name, boolean isRead) { return true; }
/** performs a put, triggering traps if present; traps are run in an unpauseable interpreter */
public void putAndTriggerTraps(Object key, Object value) throws JSExn {