Skip to content

Commit

Permalink
Merge pull request #20510 from geoand/#20490
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoffier authored Oct 2, 2021
2 parents d677f28 + 4edeed7 commit 0bce904
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public String toString(Object object, boolean pretty) throws EncodeException {
ObjectMapper mapper = pretty ? prettyMapper() : QuarkusJacksonJsonCodec.mapper;
return mapper.writeValueAsString(object);
} catch (Exception e) {
throw new EncodeException("Failed to encode as JSON: " + e.getMessage());
throw new EncodeException("Failed to encode as JSON: " + e.getMessage(), e);
}
}

Expand All @@ -154,7 +154,7 @@ public Buffer toBuffer(Object object, boolean pretty) throws EncodeException {
ObjectMapper mapper = pretty ? prettyMapper() : QuarkusJacksonJsonCodec.mapper;
return Buffer.buffer(mapper.writeValueAsBytes(object));
} catch (Exception e) {
throw new EncodeException("Failed to encode as JSON: " + e.getMessage());
throw new EncodeException("Failed to encode as JSON: " + e.getMessage(), e);
}
}

Expand Down

0 comments on commit 0bce904

Please sign in to comment.