From: adam Date: Sat, 15 Jan 2005 07:57:15 +0000 (+0000) Subject: ugly hack to fix problem with Immutable.getTrap() X-Git-Url: http://git.megacz.com/?p=org.ibex.js.git;a=commitdiff_plain;h=53a30980491096e031843fd8a533faada659d83c ugly hack to fix problem with Immutable.getTrap() darcs-hash:20050115075715-5007d-015097e94c8ff1a3194b437ac1ef2949f65ff699.gz --- diff --git a/src/org/ibex/js/JS.java b/src/org/ibex/js/JS.java index a727048..2c0baee 100644 --- a/src/org/ibex/js/JS.java +++ b/src/org/ibex/js/JS.java @@ -109,12 +109,14 @@ public interface JS extends Pausable { public JS getAndTriggerTraps(JS key) throws JSExn { return null; } // FIXME throw errors? public JS justTriggerTraps(JS key, JS value) throws JSExn { return null; } - public void addTrap(JS key, JS function) throws JSExn { throw new JSExn( - "'" + key + "' is not trappable on class ["+ getClass().getName() +"]"); } - public void delTrap(JS key, JS function) throws JSExn { throw new JSExn( - "'" + key + "' trap is read only on class ["+ getClass().getName() +"]"); } - public Trap getTrap(JS key) throws JSExn { throw new JSExn( - "'" + key + "' is not trappable on class ["+ getClass().getName() +"]"); } + public void addTrap(JS key, JS function) throws JSExn { + Log.warn(this, "'" + JSU.str(key) + "' is not trappable on class ["+ getClass().getName() +"]"); } + public void delTrap(JS key, JS function) throws JSExn { + Log.warn(this, "'" + JSU.str(key) + "' trap is read only on class ["+ getClass().getName() +"]"); } + public Trap getTrap(JS key) throws JSExn { + //Log.warn(this, "'" + JSU.str(key) + "' is not trappable on class ["+ getClass().getName() +"]"); + return null; + } public String coerceToString() { return "object"; } }