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

FactoryConfigurationError doesn't work with exception chaining very well

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 1.3.0
    • xml
    • Fix Understood
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Imported:
              Indexed: