ugly hack to fix problem with Immutable.getTrap()
authoradam <adam@megacz.com>
Sat, 15 Jan 2005 07:57:15 +0000 (07:57 +0000)
committeradam <adam@megacz.com>
Sat, 15 Jan 2005 07:57:15 +0000 (07:57 +0000)
darcs-hash:20050115075715-5007d-015097e94c8ff1a3194b437ac1ef2949f65ff699.gz

src/org/ibex/js/JS.java

index a727048..2c0baee 100644 (file)
@@ -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"; }
     }