FactoryConfigurationError doesn't work with exception chaining very well

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P3
    • tbd
    • Affects Version/s: 1.3.0
    • Component/s: 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.

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

              Created:
              Updated:
              Imported:
              Indexed: