JSExn testing of trap availability
authorcrawshaw <crawshaw@ibex.org>
Sat, 8 Jan 2005 10:03:01 +0000 (10:03 +0000)
committercrawshaw <crawshaw@ibex.org>
Sat, 8 Jan 2005 10:03:01 +0000 (10:03 +0000)
darcs-hash:20050108100301-2eb37-2cb0eacc8498d146e535239ac1c11fab5303cffa.gz

src/org/ibex/js/Interpreter.java

index 02c35ed..611d2d8 100644 (file)
@@ -320,7 +320,8 @@ class Interpreter implements ByteCodes, Tokens, Pausable {
                 if (key == null) throw je("tried to get the null key from " + JSU.str(target));
                 if (target == null) throw je("tried to get property \"" + JSU.str(key) + "\" from the null object");
                 
                 if (key == null) throw je("tried to get the null key from " + JSU.str(target));
                 if (target == null) throw je("tried to get property \"" + JSU.str(key) + "\" from the null object");
                 
-                JS.Trap t = target.getTrap(key);
+                JS.Trap t = null;
+                try { t = target.getTrap(key); } catch (JSExn e) {}
                 if(t != null) t = t.read();
                 
                 if(t == null && target instanceof JS.Clone) {
                 if(t != null) t = t.read();
                 
                 if(t == null && target instanceof JS.Clone) {