Skip to content

Commit

Permalink
允许部分接口方法跑出错误信息
Browse files Browse the repository at this point in the history
  • Loading branch information
wyouflf committed Nov 12, 2016
1 parent 475ad05 commit 6dd78bd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public DefaultParamsBuilder() {
* @return
*/
@Override
public String buildUri(RequestParams params, HttpRequest httpRequest) {
public String buildUri(RequestParams params, HttpRequest httpRequest) throws Throwable {
return httpRequest.host() + "/" + httpRequest.path();
}

Expand Down Expand Up @@ -64,7 +64,7 @@ public String buildCacheKey(RequestParams params, String[] cacheKeys) {
* @return
*/
@Override
public SSLSocketFactory getSSLSocketFactory() {
public SSLSocketFactory getSSLSocketFactory() throws Throwable {
return getTrustAllSSLSocketFactory();
}

Expand All @@ -74,7 +74,7 @@ public SSLSocketFactory getSSLSocketFactory() {
* @param params
*/
@Override
public void buildParams(RequestParams params) {
public void buildParams(RequestParams params) throws Throwable {
}

/**
Expand All @@ -84,7 +84,7 @@ public void buildParams(RequestParams params) {
* @param signs
*/
@Override
public void buildSign(RequestParams params, String[] signs) {
public void buildSign(RequestParams params, String[] signs) throws Throwable {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
public abstract class InputStreamResponseParser implements ResponseParser {

public abstract Object parse(Type resultType, Class<?> resultClass, InputStream result);
public abstract Object parse(Type resultType, Class<?> resultClass, InputStream result) throws Throwable;

/**
* Deprecated, see {@link InputStreamResponseParser#parse(Type, Class, InputStream)}
Expand Down
8 changes: 4 additions & 4 deletions xutils/src/main/java/org/xutils/http/app/ParamsBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface ParamsBuilder {
* @param httpRequest
* @return
*/
String buildUri(RequestParams params, HttpRequest httpRequest);
String buildUri(RequestParams params, HttpRequest httpRequest) throws Throwable;

/**
* 根据注解的cacheKeys构建缓存的自定义key,
Expand All @@ -36,20 +36,20 @@ public interface ParamsBuilder {
*
* @return
*/
SSLSocketFactory getSSLSocketFactory();
SSLSocketFactory getSSLSocketFactory() throws Throwable;

/**
* 为请求添加通用参数等操作
*
* @param params
*/
void buildParams(RequestParams params);
void buildParams(RequestParams params) throws Throwable;

/**
* 自定义参数签名
*
* @param params
* @param signs
*/
void buildSign(RequestParams params, String[] signs);
void buildSign(RequestParams params, String[] signs) throws Throwable;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ public interface RedirectHandler {
* @param request
* @return 返回不为null时进行重定向
*/
RequestParams getRedirectParams(UriRequest request);
RequestParams getRedirectParams(UriRequest request) throws Throwable;
}

0 comments on commit 6dd78bd

Please sign in to comment.