XMLConfigurator.createClassInstance() should catch Throwable ?

XMLConfigurator.createClassInstance() should catch Throwable ?

TL;DR I think that
org.opensaml.core.xml.config.XMLConfigurator.createClassInstance()
should catch/handle Throwable in addition to Exception.

The tests for IdP 3.3.x were failing because I inadvertently had mixed
versions of OpenSAML on the test (Maven Surefire) classpath,
opensaml-api-* was 3.3.1 but opensaml-impl-* was 3.4.0-SNAPSHOT. It
was IDP-1217 that exposed the version mixmatch.

Re: XMLConfigurator.createClassInstance() should catch Throwable ?

TL;DR I think that
org.opensaml.core.xml.config.XMLConfigurator.createClassInstance()
should catch/handle Throwable in addition to Exception.

I think that's fine to do. Probably also need to widen the ctor args
of XMLConfigurationException to take a Throwable instead of
Exception, so as not to have nasty conditional logic in the catch.

I think it does lead though to the more philosophical question in
Java of when/where we should care about this case in general. Any
code anywhere can theoretically throw an unchecked java.lang.Error.
But we obviously aren't going to generally catch Throwable
*everywhere*, as opposed to specific types of checked exceptions.
And we don't generally catch java.lang.Exception to cover unchecked
java.lang.RuntimeException, for the same reasons. Both of those are
generally fatal (which is why they are unchecked), so it begs the
question when is it appropriate to handle explicitly. If there's a
specific case we've actually encountered then I guess that's a good
argument - for better logging, etc. But there's probably umpteen
other similar cases we don't (yet).