From 53a30980491096e031843fd8a533faada659d83c Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 15 Jan 2005 07:57:15 +0000 Subject: [PATCH] ugly hack to fix problem with Immutable.getTrap() darcs-hash:20050115075715-5007d-015097e94c8ff1a3194b437ac1ef2949f65ff699.gz --- src/org/ibex/js/JS.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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"; } } -- 1.7.10.4