Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6441330

FactoryConfigurationError doesn't work with exception chaining very well

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 1.3.0
    • Fix Version/s: tbd
    • Component/s: xml
    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      generic
    • OS:
      generic

      Description

      FactoryConfigurationError should be modified so that the nested exception properly participates in the JDK's own exception chaining mechanism.

      Specifically, change this:

          public FactoryConfigurationError(Exception e) {
              super(e.toString());
              this.exception = e;
          }

      ... to ...

          public FactoryConfigurationError(Exception e) {
              super(e);
              this.exception = e;
          }

      and this ...

          public FactoryConfigurationError(Exception e, String msg) {
              super(msg);
              this.exception = e;
          }

      to ...

          public FactoryConfigurationError(Exception e, String msg) {
              super(msg,e);
              this.exception = e;
          }


      This would allow e.printStackTrace() method to display the linked exceptions correctly, which is helpful for trouble-shooting FactoryConfigurationError.

        Attachments

          Activity

            People

            Assignee:
            joehw Joe Wang
            Reporter:
            kkawagucsunw Kohsuke Kawaguchi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Imported:
              Indexed: