Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.6
-
None
Description
JMSException has an archaic mechanism to chain the root cause by calling the setLinkedException() method. It predates the introduction of the Throwable.initCause() method in Java 1.4 which standardized the exception chaining.
Currently when Qpid creates a JMSException the initCause() method isn't always called. This results in difficult to interpret stacktraces which are missing the root cause.
The right behavior would be to call both methods, setLinkedException and initCause, to maintain the backward compatibility with code looking at the linked exception and to display the full exception chain when the exception is printed.