Qpid
  1. Qpid
  2. QPID-2594

Exception chaining for JMSExceptions

    Details

      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.

      1. initcause.patch
        19 kB
        Emmanuel Bourg

        Activity

        Emmanuel Bourg made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Emmanuel Bourg made changes -
        Field Original Value New Value
        Attachment initcause.patch [ 12444205 ]
        Emmanuel Bourg created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Emmanuel Bourg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development