Author: [email protected]
Date: Fri Apr 3 09:36:11 2009
New Revision: 5183
Modified:
trunk/user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
trunk/user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamReader.java
Log:
Hooking up a couple of missing cause chains in the server-side RPC
exception handling code.
Also added a hack to dump a particular exception case to the console, to
help us debug
an intermittent RPC test failure condition.
Modified:
trunk/user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
==============================================================================
---
trunk/user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
(original)
+++
trunk/user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
Fri Apr 3 09:36:11 2009
@@ -201,7 +201,8 @@
caught = new InvocationException(encodedResponse);
}
} catch (com.google.gwt.user.client.rpc.SerializationException e) {
- caught = new IncompatibleRemoteServiceException();
+ caught = new IncompatibleRemoteServiceException(
+ "The response could not be deserialized", e);
} catch (Throwable e) {
caught = e;
} finally {
Modified:
trunk/user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamReader.java
==============================================================================
---
trunk/user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamReader.java
(original)
+++
trunk/user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamReader.java
Fri Apr 3 09:36:11 2009
@@ -537,8 +537,20 @@
throw new SerializationException(e);
} catch (InvocationTargetException e) {
- throw new SerializationException(e);
+ /*
+ * HACK(scottb): temporary hack to print internal exceptions to the
+ * console while we try to pin down a flaky RPC test that fails very
+ * intermittently. The stack trace gets lost when we send this server
+ * exception back to the client, because we currently don't serialize
+ * cause and stacktrace across the wire. We end up with a useless
+ * client-side stacktrace that has no cause, and that's what JUnit
sees.
+ * We can remove this spam if we serialize cause/stacktrace back to
the
+ * client even if we haven't yet solve the flaky RPC test issue.
+ */
+ e.getTargetException().printStackTrace(System.out);
+ e.getTargetException().printStackTrace(System.err);
+ throw new SerializationException(e.getTargetException());
} catch (NoSuchMethodException e) {
throw new SerializationException(e);
}
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---