use of cn.jeesoft.qa.error.QANoSupportException in project QuickAndroid by ImKarl.
the class OkHttp method handlerResponse.
private <T> void handlerResponse(String url, QARequestParams params, Response response, QAHttpCallback<T> listener) {
try {
Class<T> type = DefaultHttp.getResultType(listener);
QAHttpHandler<T> httpHandler = getHttpHandler(params, type);
if (httpHandler == null) {
sendFailedCallback(url, new QANoSupportException(QAException.CODE_NO_SUPPORT, "不支持的类型'" + type + "'"), listener);
}
sendSuccessNetCallback(url, httpHandler.handlerResponse(response), listener);
} catch (Throwable e) {
sendFailedCallback(url, e, listener);
}
}
Aggregations