Skip to content

Commit c3efb7a

Browse files
author
prabhaji
committed
changes in log handler
1 parent e97e9a3 commit c3efb7a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/com/wso2telco/logging/PropertyLogHandlerESB.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,15 @@ private void logResponsePropertiesESB(MessageContext messageContext,
8585
String jsonBody =null;
8686

8787
if(errorCode != null){
88-
String xmlString=axis2MessageContext.getEnvelope().toString();
88+
try {
89+
String xmlString = axis2MessageContext.getEnvelope().toString();
8990
JSONObject xmlJsonObj = XML.toJSONObject(xmlString);
9091
jsonBody = xmlJsonObj.toString();
91-
FAULT =jsonBody;
92+
FAULT = jsonBody;
93+
}
94+
catch (Exception e){
95+
e.printStackTrace();
96+
}
9297
}
9398
else{
9499
jsonBody = JsonUtil.jsonPayloadToString(axis2MessageContext);

0 commit comments

Comments
 (0)