public class HttpExceptionChecker extends Object
| Constructor and Description |
|---|
HttpExceptionChecker() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isNoInternetConnection(Exception e)
Determines if the Exception is a
NoInternetConnectionException. |
static boolean |
isServerNotReachable(Exception e)
Tries to determine, if the thrown Exception has been thrown because the
server is not reachable.
|
static boolean |
isUnexpectesStatusCode(Exception e)
This method will be thrown, if the http status code was unexpected, and a
UnexpectedHttpStatusCodeException was thrown |
public static boolean isServerNotReachable(Exception e)
e - The exceptionpublic static boolean isNoInternetConnection(Exception e)
NoInternetConnectionException.
That means, that the user has definitely not an active internet
connection.e - NoInternetConnectionExceptionpublic static boolean isUnexpectesStatusCode(Exception e)
UnexpectedHttpStatusCodeException was throwne - UnexpectedHttpStatusCodeExceptionCopyright © 2015 Hannes Dorfmann. All rights reserved.