Code example for HttpResponseException

Methods: getStatusCode

0
			desc = "网络通信超时,请确定网络正常后重试";
		} else if (e instanceof HttpResponseException) {
			result = HTTP_ERROR;
			HttpResponseException httpEx = (HttpResponseException) e;
			desc = "网络通信失败,请稍后再试";
			if(!(httpEx.getStatusCode()==-1)){
				desc = desc +"-" + httpEx.getStatusCode();
			} 
			LogUtils.loge(LOG_TAG, e.getMessage());
		} else { 
			result = SYSTEM_EXCEPTION; // 系统异常
			desc = "系统处理失败,请稍后再试";
			LogUtils.loge(LOG_TAG, e.getMessage());
		} 
 
		response.setCode(result);
		response.setDesc(desc);
	} 
	 
	 
}