2002/10/03 23:37:07
[org.ibex.core.git] / src / org / xwt / Proxy.java
index 15e6ef0..4ff75b8 100644 (file)
@@ -125,6 +125,8 @@ public class Proxy {
                 Log.log(Platform.class, "WPAD detection failed due to:");
                 if (e instanceof EcmaError) Log.log(HTTP.class, ((EcmaError)e).getMessage() + " at " +
                                                     ((EcmaError)e).getSourceName() + ":" + ((EcmaError)e).getLineNumber());
+                else if (e instanceof JSObject)
+                   XWT.recursivePrintObject.call(Context.enter(), null, null, new Object[] { e });
                 else Log.log(Platform.class, e);
             }
             return null;
@@ -279,10 +281,10 @@ public class Proxy {
             };
         
         private static boolean match(String[] arr, String s, int index) {
-            if (index == arr.length) return true;
+            if (index >= arr.length) return true;
             for(int i=0; i<s.length(); i++) {
                 String s2 = s.substring(i);
-                if (s2.startsWith(arr[index]) && match(arr, s.substring(arr[index].length()), index + 1)) return true;
+                if (s2.startsWith(arr[index]) && match(arr, s2.substring(arr[index].length()), index + 1)) return true;
             }
             return false;
         }