Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Complete
-
Affects Version/s: 4.1.6, 4.1.7
-
Fix Version/s: 4.2.GA
-
Component/s: None
-
Labels:
-
Environment:Using Spring boot so it is difficult to tell which versions are being pulled in, but it is the latest.
-
Pull Request URL:
Description
After throwing my own exception in a Spring Integration @Transform annotated method, the detailsMessage of the MessageTransformationException is an empty string. When the toString() on the exception is called there is an extra semi-colon e.g.:
; nested exception is org.springframework.messaging.MessageHandlingException: ; nested exception is com.example.app.exceptions.ImportException: my reason for blowing up
The error is coming from: org.springframework.messaging.MessagingException
public MessagingException(Message<?> message, Throwable cause) { super("", cause); <----- this.failedMessage = message; }
So when the exception cause list is generated the first one is always blank, which creates a semi-colon at the front of the toString() which is a bit unsightly.
My suggestion would be to check for exceptions with no details and miss them out or put the name of the exception and a note to say that there are no details although the original exception is the most useful but that is already stated at the end of the chain. Maybe if the chain was the other way around - sorry just thinking allowed!
Attachments
Issue Links
- relates to
-
SPR-13447 MessagingException should not provide empty description String to NestedRuntimeException
-
- Closed
-