Skip to content

Commit

Permalink
log data in json object conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
janithcmw committed Feb 8, 2022
1 parent fd71c48 commit 8f085d5
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -125,7 +125,15 @@ protected Object execute(Object data, State state) {
returnValue = jsonParser.parse(data.toString());
} catch (ParseException e) {
log.error(siddhiQueryContext.getSiddhiAppContext().getName() + ":" + siddhiQueryContext.getName() +
": Cannot parse the given string into JSON. Hence returning null");
": Cannot parse the given string, '" + data.toString() + "', into JSON. Hence returning null");
log.error("The error stack trace for the catch of 'ParseException' in " +
"'ToJSONObjectFunctionExtension' is : ", e);
} catch (Exception e) {
log.error("An error occurred when parsing to the json object. The data which " +
"was trying to convert is : '" + data.toString() + ".");
log.error("The error stack trace for the catch of 'Exception' in 'ToJSONObjectFunctionExtension' " +
"is : ", e);
throw e;
}
return returnValue;
}
Expand Down

0 comments on commit 8f085d5

Please sign in to comment.