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.
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.