@SuppressWarnings({"ThrowableResultOfMethodCallIgnored", "ConstantConditions", "deprecation"}) private static boolean isHttpException(Throwable cause, int httpCode) { if (isException(cause, retrofit2.HttpException.class)) { retrofit2.HttpException httpException = (retrofit2.HttpException) getCause(cause, retrofit2.HttpException.class); return httpCode == httpException.code(); } if (isException(cause, retrofit2.adapter.rxjava2.HttpException.class)) { retrofit2.adapter.rxjava2.HttpException httpException = (retrofit2.adapter.rxjava2.HttpException) getCause(cause, retrofit2.adapter.rxjava2.HttpException.class); return httpCode == httpException.code(); } return false; }
@SuppressWarnings({"ThrowableResultOfMethodCallIgnored", "ConstantConditions", "deprecation"}) private static boolean isHttpException(Throwable cause, int httpCode) { if (isException(cause, retrofit2.HttpException.class)) { retrofit2.HttpException httpException = (retrofit2.HttpException) getCause(cause, retrofit2.HttpException.class); return httpCode == httpException.code(); } if (isException(cause, retrofit2.adapter.rxjava2.HttpException.class)) { retrofit2.adapter.rxjava2.HttpException httpException = (retrofit2.adapter.rxjava2.HttpException) getCause(cause, retrofit2.adapter.rxjava2.HttpException.class); return httpCode == httpException.code(); } return false; }
(retrofit2.adapter.rxjava2.HttpException) getCause(cause, retrofit2.adapter.rxjava2.HttpException.class); message = httpCode2MessageResource(httpException.code());