diff options
author | 2017-08-22 18:13:11 +0530 | |
---|---|---|
committer | 2017-08-24 11:28:09 +0530 | |
commit | 7925630b5edc79119f29392edc6ddc84cf7c3757 (patch) | |
tree | b99b3e1d5b0c5b7058d3f7c66b778a2c4291f2ad /ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java | |
parent | c53fa990ea27ec074859eb94bcb7ec6deaa2157b (diff) |
Sonar fix forONAP-PAP-REST critical sonar issues
Policy engine code cleanup for fixing exceptions, logger stream
requirements.
Change-Id: If641478dff698830d89ff4bb6ef8c698733ba0a6
Issue-Id: [POLICY-174]
Signed-off-by: AvinashS <avinash.s@huawei.com>
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java')
-rw-r--r-- | ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java index 80657fcd6..eff4e7f2f 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java @@ -512,13 +512,14 @@ public class PolicyCreation extends AbstractPolicyCreation{ response.addHeader("error", "error"); } }catch(Exception e){ + LOGGER.error("Exception Occured : ",e); if(policyDBDaoTransaction != null){ policyDBDaoTransaction.rollbackTransaction(); } } } catch (Exception e){ - LOGGER.error("Exception Occured : "+e); + LOGGER.error("Exception Occured : "+e.getMessage(),e); body = "error"; response.addHeader("error", e.getMessage()); response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); |