2002/10/03 23:45:58
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:50:42 +0000 (06:50 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:50:42 +0000 (06:50 +0000)
darcs-hash:20040130065042-2ba56-778840dc52c55b6d2c37fb3058285fe339d90896.gz

src/org/xwt/Proxy.java
src/org/xwt/XWT.java

index 4ff75b8..83950aa 100644 (file)
@@ -125,8 +125,14 @@ 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 if (e instanceof JavaScriptException) {
+                   try {
+                       XWT.recursivePrintObject.call(Context.enter(), null, null, new Object[] {
+                           ((JavaScriptException)e).getValue() });
+                   } catch (Exception e2) {
+                       Log.log(Platform.class, e);
+                   }
+               }
                 else Log.log(Platform.class, e);
             }
             return null;
index c266690..7d73e9c 100644 (file)
@@ -441,7 +441,7 @@ public final class XWT extends JSObject {
     }
 
     static final JSObject.JSFunction recursivePrintObject = new JSObject.JSFunction() {
-            public Object call(Context cx, Scriptable thisObj, Scriptable ctorObj, Object[] args) throws JavaScriptException {
+            public Object call(Context cx, Scriptable thisObj, Scriptable ctorObj, Object[] args) {
                 if (args == null || args.length != 1) return null;
                 recurse("", "", args[0], cx);
                 return null;