Skip to content

Commit

Permalink
Addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Cholewa committed Oct 24, 2016
1 parent cbb204e commit 1bf0d94
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,14 @@ private static String buildMessage(
String druidQueryString;
try {
druidQueryString = objectWriter.writeValueAsString(druidQuery);
} catch (JsonProcessingException e) {
druidQueryString = druidQuery.toString();
LOG.warn(String.format("Failed to properly serialize druid query %s", druidQueryString), e);
} catch (JsonProcessingException jse) {
try {
druidQueryString = druidQuery.toString();
} catch (Exception e) {
LOG.warn("Error invoking a druid query's toString.", e);
druidQueryString = "QUERY'S `toString` FAILED";
}
LOG.warn(String.format("Failed to serialize druid query %s", druidQueryString), jse);
}
return String.format(
"reason: %s, description: %s, statusCode: %d, druid query: %s, cause: %s",
Expand Down

0 comments on commit 1bf0d94

Please sign in to comment.