Skip to content

Commit

Permalink
DATAREST-434 - Forward root exception in PersistentEntityResourceHand…
Browse files Browse the repository at this point in the history
…lerMethodArgumentResolver.
  • Loading branch information
odrotbohm committed Jan 8, 2015
1 parent e39d624 commit 368b369
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -173,8 +173,8 @@ private Object readPatch(IncomingRequest request, ObjectMapper mapper, Object ex
try {
JsonPatchHandler handler = new JsonPatchHandler(mapper, reader);
return handler.apply(request, existingObject);
} catch (Exception e) {
throw new HttpMessageNotReadableException(String.format(ERROR_MESSAGE, existingObject.getClass()));
} catch (Exception o_O) {
throw new HttpMessageNotReadableException(String.format(ERROR_MESSAGE, existingObject.getClass()), o_O);
}
}

Expand All @@ -183,9 +183,8 @@ private Object read(IncomingRequest request, HttpMessageConverter<Object> conver

try {
return converter.read(information.getDomainType(), request.getServerHttpRequest());
} catch (IOException e) {
throw new HttpMessageNotReadableException(String.format(ERROR_MESSAGE, information.getDomainType()));
} catch (IOException o_O) {
throw new HttpMessageNotReadableException(String.format(ERROR_MESSAGE, information.getDomainType()), o_O);
}
}

}

0 comments on commit 368b369

Please sign in to comment.