polishing

If no converter is found, the MessageConversionException now contains
the message instance that could not be handled

Issue: SPR-11817
This commit is contained in:
Stephane Nicoll
2014-05-30 14:53:09 +02:00
parent 987806f7c2
commit e4ad9c5204
2 changed files with 10 additions and 8 deletions

View File

@@ -67,9 +67,9 @@ public abstract class AbstractMessageReceivingTemplate<D> extends AbstractMessag
MessageConverter messageConverter = getMessageConverter();
T value = (T) messageConverter.fromMessage(message, targetClass);
if (value == null) {
throw new MessageConversionException("Unable to convert payload='"
throw new MessageConversionException(message, "Unable to convert payload='"
+ message.getPayload() + "' to type='" + targetClass
+ "', converter=[" + messageConverter + "]");
+ "', converter=[" + messageConverter + "]", null);
}
return value;
}