Search in sources :

Example 1 with QANoSupportException

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);
    }
}
Also used : QANoSupportException(cn.jeesoft.qa.error.QANoSupportException)

Aggregations

QANoSupportException (cn.jeesoft.qa.error.QANoSupportException)1