mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-05-17 04:02:52 +08:00
增加注释
This commit is contained in:
@@ -153,11 +153,11 @@ public class ClientHttpRequest<T> extends HttpEntityEnclosingRequestBase impleme
|
||||
entity.writeTo((OutputStream)t);
|
||||
return t;
|
||||
} catch (InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
throw new PayErrorException(new PayException("InstantiationException", e.getMessage()));
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
throw new PayErrorException(new PayException("IllegalAccessException", e.getMessage()));
|
||||
}
|
||||
throw new HttpResponseException(statusLine.getStatusCode(), responseType + " 无法进行类型转换");
|
||||
|
||||
}
|
||||
}
|
||||
String charset = "UTF-8";
|
||||
@@ -174,7 +174,7 @@ public class ClientHttpRequest<T> extends HttpEntityEnclosingRequestBase impleme
|
||||
try {
|
||||
return JSON.parseObject(result, responseType);
|
||||
}catch (JSONException e){
|
||||
throw new PayErrorException(new PayException("failure", "类型转化异常,contentType:" + entity.getContentType().getValue(), result));
|
||||
throw new PayErrorException(new PayException("failure", String.format("类型转化异常,contentType: %s\n%s", entity.getContentType().getValue(), e.getMessage() ), result));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user