LGTM

On Tue, May 24, 2011 at 5:04 AM, <[email protected]> wrote:

> Reviewers: rjrjr,
>
> Description:
> Add the method name to the message of InvocationService to make it
> easier to
> find out the rootcause of the exception.
>
>
> Please review this at http://gwt-code-reviews.appspot.com/1450803/
>
> Affected files:
>  M user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java
>  M user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java
>  M user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
>
>
> Index: user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java
> ===================================================================
> --- user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java
> (revision 10205)
> +++ user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java
> (working copy)
> @@ -83,7 +83,7 @@
>         caught = new StatusCodeException(statusCode, encodedResponse);
>       } else if (encodedResponse == null) {
>         // This can happen if the XHR is interrupted by the server dying
> -        caught = new InvocationException("No response payload");
> +        caught = new InvocationException("No response payload from " +
> methodName);
>       } else {
>         result = (T)
> streamFactory.createStreamReader(encodedResponse).readObject();
>       }
> Index: user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java
> ===================================================================
> --- user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java
>      (revision 10205)
> +++ user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java
>      (working copy)
> @@ -372,7 +372,8 @@
>       return rb.send();
>     } catch (RequestException ex) {
>       InvocationException iex = new InvocationException(
> -          "Unable to initiate the asynchronous service invocation -- check
> the network connection",
> +          "Unable to initiate the asynchronous service invocation (" +
> +          methodName + ") -- check the network connection",
>           ex);
>       callback.onFailure(iex);
>     } finally {
> Index:
> user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
> ===================================================================
> ---
> user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
>  (revision 10205)
> +++
> user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
>  (working copy)
> @@ -209,13 +209,13 @@
>         caught = new StatusCodeException(statusCode, encodedResponse);
>       } else if (encodedResponse == null) {
>         // This can happen if the XHR is interrupted by the server dying
> -        caught = new InvocationException("No response payload");
> +        caught = new InvocationException("No response payload from " +
> methodName);
>       } else if (RemoteServiceProxy.isReturnValue(encodedResponse)) {
>         result = (T)
> responseReader.read(streamFactory.createStreamReader(encodedResponse));
>       } else if (RemoteServiceProxy.isThrownException(encodedResponse)) {
>         caught = (Throwable)
> streamFactory.createStreamReader(encodedResponse).readObject();
>       } else {
> -        caught = new InvocationException(encodedResponse);
> +        caught = new InvocationException(encodedResponse + " from " +
> methodName);
>       }
>     } catch (com.google.gwt.user.client.rpc.SerializationException e) {
>       caught = new IncompatibleRemoteServiceException(
>
>
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to