[android-xmlrpc] r28 committed - fixed Issue 30:...

0 views
Skip to first unread message

android...@googlecode.com

unread,
Dec 29, 2011, 5:42:01 AM12/29/11
to android-x...@googlegroups.com
Revision: 28
Author: pskink
Date: Thu Dec 29 02:37:12 2011
Log: fixed Issue 30:

http://code.google.com/p/android-xmlrpc/issues/detail?id=30
http://code.google.com/p/android-xmlrpc/source/detail?r=28

Modified:
/trunk/XMLRPC/src/org/xmlrpc/android/XMLRPCClient.java
/trunk/XMLRPC/src/org/xmlrpc/android/XMLRPCException.java

=======================================
--- /trunk/XMLRPC/src/org/xmlrpc/android/XMLRPCClient.java Mon Mar 28
12:26:13 2011
+++ /trunk/XMLRPC/src/org/xmlrpc/android/XMLRPCClient.java Thu Dec 29
02:37:12 2011
@@ -307,9 +307,9 @@
// check status code
int statusCode = response.getStatusLine().getStatusCode();
//Log.d(Tag.LOG, "ros status code:" + statusCode);
- if (statusCode != HttpStatus.SC_OK) {
- throw new XMLRPCException("HTTP status code: " + statusCode + " != " +
HttpStatus.SC_OK);
- }
+ if (statusCode != HttpStatus.SC_OK) {
+ throw new XMLRPCException("HTTP status code: " +
statusCode + " != " + HttpStatus.SC_OK, statusCode);
+ }

// parse response stuff
//
=======================================
--- /trunk/XMLRPC/src/org/xmlrpc/android/XMLRPCException.java Sat Dec 13
05:11:26 2008
+++ /trunk/XMLRPC/src/org/xmlrpc/android/XMLRPCException.java Thu Dec 29
02:37:12 2011
@@ -1,5 +1,7 @@
package org.xmlrpc.android;

+import org.apache.http.HttpStatus;
+
public class XMLRPCException extends Exception {

/**
@@ -7,6 +9,8 @@
*/
private static final long serialVersionUID = 7499675036625522379L;

+ private int httpStatusCode = HttpStatus.SC_OK;
+
public XMLRPCException(Exception e) {
super(e);
}
@@ -14,4 +18,13 @@
public XMLRPCException(String string) {
super(string);
}
-}
+
+ public XMLRPCException(String string, int httpStatusCode) {
+ this(string);
+ this.httpStatusCode = httpStatusCode;
+ }
+
+ public int getHttpStatusCode() {
+ return httpStatusCode;
+ }
+}

Reply all
Reply to author
Forward
0 new messages