Revision: 8475
Author: [email protected]
Date: Thu Aug  5 20:35:34 2010
Log: Enhancement for issue 4870

Review at http://gwt-code-reviews.appspot.com/711802

Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=8475

Modified:
 /trunk/user/src/com/google/gwt/user/client/rpc/StatusCodeException.java

=======================================
--- /trunk/user/src/com/google/gwt/user/client/rpc/StatusCodeException.java Thu Apr 10 16:39:57 2008 +++ /trunk/user/src/com/google/gwt/user/client/rpc/StatusCodeException.java Thu Aug 5 20:35:34 2010
@@ -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;
   }

   /**
@@ -42,4 +51,3 @@
     return statusCode;
   }
 }
-

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

Reply via email to