2003/11/29 03:06:10
[org.ibex.core.git] / src / org / xwt / js / JSScope.java
index 971d550..3e797f3 100644 (file)
@@ -13,17 +13,17 @@ public class JSScope extends JS {
     private static final Object NULL_PLACEHOLDER = new Object();
 
     public JSScope(JSScope parentScope) { this.parentScope = parentScope; }
-    public void declare(String s) { super.put(s, NULL_PLACEHOLDER); }
+    public void declare(String s) throws JSExn { super.put(s, NULL_PLACEHOLDER); }
     public JSScope getParentScope() { return parentScope; }
 
-    public Object get(Object key) {
+    public Object get(Object key) throws JSExn {
         Object o = super.get(key);
         if (o != null) return o == NULL_PLACEHOLDER ? null : o;
         else return parentScope == null ? null : parentScope.get(key);
     }
 
-    public boolean has(Object key) { return super.get(key) != null; }
-    public void put(Object key, Object val) {
+    public boolean has(Object key) throws JSExn { return super.get(key) != null; }
+    public void put(Object key, Object val) throws JSExn {
         if (parentScope != null && !has(key)) parentScope.put(key, val);
         else super.put(key, val == null ? NULL_PLACEHOLDER : val);
     }
@@ -33,7 +33,7 @@ public class JSScope extends JS {
         private final static Double POSITIVE_INFINITY = new Double(Double.POSITIVE_INFINITY);
 
         public Global() { super(null); }
-        public Object get(Object key) {
+        public Object get(Object key) throws JSExn {
             //#switch(key)
             case "NaN": return NaN;
             case "Infinity": return POSITIVE_INFINITY;
@@ -53,7 +53,7 @@ public class JSScope extends JS {
             return super.get(key);
         }
 
-        public Object callMethod(Object method, Object a0, Object a1, Object a2, Object[] rest, int nargs) {
+        public Object callMethod(Object method, Object a0, Object a1, Object a2, Object[] rest, int nargs) throws JSExn {
             switch(nargs) {
                 case 0: {
                     //#switch(method)