<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 5/31/18 5:04 PM, Tom Zeller wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMNmQDQXRWtkjYs3ky10r-OD2prdG3kWbzooLf=utzSAh_b+cg@mail.gmail.com">
<pre wrap="">TL;DR I think that
org.opensaml.core.xml.config.XMLConfigurator.createClassInstance()
should catch/handle Throwable in addition to Exception.
</pre>
</blockquote>
<br>
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.<br>
<br>
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).<br>
</body>
</html>