mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 07:56:19 +00:00
Merge pull request #558 from owncloud/fix/unknown_error_message
[FIX] Introduce new error message for ProtocolException
This commit is contained in:
commit
cbbe044212
@ -46,6 +46,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
|
import java.net.ProtocolException;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
@ -166,7 +167,10 @@ public class RemoteOperationResult<T>
|
|||||||
} else if (e instanceof FileNotFoundException) {
|
} else if (e instanceof FileNotFoundException) {
|
||||||
mCode = ResultCode.LOCAL_FILE_NOT_FOUND;
|
mCode = ResultCode.LOCAL_FILE_NOT_FOUND;
|
||||||
|
|
||||||
} else {
|
} else if (e instanceof ProtocolException) {
|
||||||
|
mCode = ResultCode.NETWORK_ERROR;
|
||||||
|
}
|
||||||
|
else {
|
||||||
mCode = ResultCode.UNKNOWN_ERROR;
|
mCode = ResultCode.UNKNOWN_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -589,5 +593,6 @@ public class RemoteOperationResult<T>
|
|||||||
SPECIFIC_METHOD_NOT_ALLOWED,
|
SPECIFIC_METHOD_NOT_ALLOWED,
|
||||||
SPECIFIC_BAD_REQUEST,
|
SPECIFIC_BAD_REQUEST,
|
||||||
TOO_EARLY,
|
TOO_EARLY,
|
||||||
|
NETWORK_ERROR,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user