Increased chunk size up to 1MB
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / RemoteOperationResult.java
index 1415228..b371fb8 100644 (file)
@@ -30,6 +30,7 @@ import javax.net.ssl.SSLException;
 import org.apache.commons.httpclient.ConnectTimeoutException;
 import org.apache.commons.httpclient.HttpException;
 import org.apache.commons.httpclient.HttpStatus;
+import org.apache.jackrabbit.webdav.DavException;
 
 import com.owncloud.android.network.CertificateCombinedException;
 
@@ -65,7 +66,9 @@ public class RemoteOperationResult implements Serializable {
         SSL_RECOVERABLE_PEER_UNVERIFIED,
         BAD_OC_VERSION,
         STORAGE_ERROR_MOVING_FROM_TMP,
-        CANCELLED
+        CANCELLED, 
+        INVALID_LOCAL_FILE_NAME, 
+        INVALID_OVERWRITE
     }
 
     private boolean mSuccess = false;
@@ -205,11 +208,17 @@ public class RemoteOperationResult implements Serializable {
             } else if (mException instanceof UnknownHostException) {
                 return "Unknown host exception";
         
-            } else if (mException instanceof SSLException) {
-                if (mCode == ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED)
+            } else if (mException instanceof CertificateCombinedException) {
+                if (((CertificateCombinedException) mException).isRecoverable())
                     return "SSL recoverable exception";
                 else
                     return "SSL exception";
+                
+            } else if (mException instanceof SSLException) {
+                return "SSL exception";
+
+            } else if (mException instanceof DavException) {
+                return "Unexpected WebDAV exception";
 
             } else if (mException instanceof HttpException) {
                 return "HTTP violation";
@@ -236,7 +245,7 @@ public class RemoteOperationResult implements Serializable {
         }
         
         return "Operation finished with HTTP status code " + mHttpCode + " (" + (isSuccess()?"success":"fail") + ")";
-
+        
     }
 
 }