diff options
| author | duandongmei <[email protected]> | 2019-05-17 15:30:18 +0800 |
|---|---|---|
| committer | duandongmei <[email protected]> | 2019-05-17 15:30:18 +0800 |
| commit | 28771355cc350119761173527932188cd6d3bd1a (patch) | |
| tree | 980d4d38d4ddbc441f76bf0fc326cbef7f5810fc | |
| parent | 0629e8b1de46401ec6ab0e44676346dcbdd553e9 (diff) | |
http client增加错误信息打印
| -rw-r--r-- | src/main/java/com/nis/util/ConfigServiceUtil.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/nis/util/ConfigServiceUtil.java b/src/main/java/com/nis/util/ConfigServiceUtil.java index 961e68aa..e3461272 100644 --- a/src/main/java/com/nis/util/ConfigServiceUtil.java +++ b/src/main/java/com/nis/util/ConfigServiceUtil.java @@ -190,6 +190,7 @@ public class ConfigServiceUtil { result=response.readEntity(String.class);
}
} catch (Exception e) {
+ e.printStackTrace();
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
}
if(response != null && response.getStatus() == 200){
@@ -235,6 +236,7 @@ public class ConfigServiceUtil { result=response.readEntity(String.class);
}
} catch (Exception e) {
+ e.printStackTrace();
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
}
if(response != null && response.getStatus() == 200){
@@ -244,6 +246,7 @@ public class ConfigServiceUtil { throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+result);
}
} catch (Exception e) {
+ e.printStackTrace();
logger.error("postCallbackCfg()",e);
throw e;
}finally {
@@ -279,6 +282,7 @@ public class ConfigServiceUtil { result=response.readEntity(String.class);
}
} catch (Exception e) {
+ e.printStackTrace();
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
}
if(response != null && response.getStatus() == 200){
@@ -326,6 +330,7 @@ public class ConfigServiceUtil { result=response.readEntity(String.class);
}
} catch (Exception e) {
+ e.printStackTrace();
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
}
if(response != null && response.getStatus() == 200){
@@ -375,6 +380,7 @@ public class ConfigServiceUtil { result=response.readEntity(String.class);
}
} catch (Exception e) {
+ e.printStackTrace();
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
}
if(response !=null && response.getStatus() == 200){
@@ -418,6 +424,7 @@ public class ConfigServiceUtil { // bean = (ToMaatResult) JSONObject.toBean(resObject,ToMaatResult.class);
//获取响应结果
} catch (Exception e) {
+ e.printStackTrace();
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+result);
}
} catch (Exception e) {
@@ -452,6 +459,7 @@ public class ConfigServiceUtil { result=response.readEntity(String.class);
}
} catch (Exception e) {
+ e.printStackTrace();
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
}
if(response !=null && response.getStatus() == 200){
|
