-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Artem Bilan opened SPR-13447 and commented
The code to consider:
public MessagingException(Message<?> message) {
super("");
this.failedMessage = message;
}Where the NestedRuntimeException superclass does this:
public String getMessage() {
return NestedExceptionUtils.buildMessage(super.getMessage(), getCause());
}And that utility method implementation is like this:
if (message != null) {
sb.append(message).append("; ");
}Having such a logic we end up with bad StackTrace message which is starting just from the "; " string.
We can just provide the null for that description to the superclass or deprecate all those constructors without description argument in the MessagingException and its inheritors to make end user to provide the particular info for better logs readability.
See the linked Spring Integration issue and its Pull Request for more info.
Looking forward for any other thoughts on the matter!
Thanks in advance
Affects: 4.1.7, 4.2.1
Issue Links:
- JmsMessagingTemplate should not throw JmsException directly [SPR-12038] #16654 JmsMessagingTemplate should not throw JmsException directly
- INT-3821 Message details are blank
Referenced from: commits c4f5a0f, 987d93f
Backported to: 4.1.8