Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-2594

Exception chaining for JMSExceptions

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.6
    • Fix Version/s: 0.7
    • Labels:
      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.

        Attachments

        1. initcause.patch
          19 kB
          Emmanuel Bourg

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: