Reviewers: zundel,

Description:
Enhancement for issue 4870


Please review this at http://gwt-code-reviews.appspot.com/711802/show

Affected files:
  M user/src/com/google/gwt/user/client/rpc/StatusCodeException.java


Index: user/src/com/google/gwt/user/client/rpc/StatusCodeException.java
===================================================================
--- user/src/com/google/gwt/user/client/rpc/StatusCodeException.java (revision 8450) +++ user/src/com/google/gwt/user/client/rpc/StatusCodeException.java (working copy)
@@ -23,16 +23,25 @@
  */
 public class StatusCodeException extends InvocationException {
   private final int statusCode;
+  private final String encodedResponse;

   /**
    * Construct an exception with the given status code and description.
    *
    * @param statusCode the HTTP status code to report
-   * @param message a message to report
+   * @param encodedResponse the HTTP response message to report
    */
-  public StatusCodeException(int statusCode, String message) {
-    super(message);
+  public StatusCodeException(int statusCode, String encodedResponse) {
+    super(statusCode + " " + encodedResponse);
     this.statusCode = statusCode;
+    this.encodedResponse = encodedResponse;
+  }
+
+  /**
+   * Returns the response message associated with the failed request.
+   */
+  public String getEncodedResponse() {
+    return encodedResponse;
   }

   /**
@@ -41,5 +50,4 @@
   public int getStatusCode() {
     return statusCode;
   }
-}
-
+}
\ No newline at end of file


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

Reply via email to