Improve logging when crypto class constructor fails
---------------------------------------------------
Key: WSS-30
URL: http://issues.apache.org/jira/browse/WSS-30
Project: WSS4J
Type: Improvement
Reporter: Xavier Toth
Assigned to: Davanum Srinivas
if the instantiation of the crypto class fails try and get the real cause and
log it so that users will know what to fix.
Diff of CryptoFactory.java
119,130c119
< } catch (java.lang.reflect.InvocationTargetException e) {
< Throwable cause = e.getCause();
< if (cause != null) {
< cause.printStackTrace();
< log.error("Unable to instantiate (1): " + cryptoClassName,
cause);
< }
< else {
< e.printStackTrace();
< log.error("Unable to instantiate (1): " + cryptoClassName, e);
< }
< }
< catch (java.lang.Exception e) {
---
> } catch (java.lang.Exception e) {
139,148c128,130
< Throwable cause = e.getCause();
< if (cause != null) {
< cause.printStackTrace();
< log.error("Unable to instantiate (2): " + cryptoClassName,
cause);
< }
< else {
< e.printStackTrace();
< log.error("Unable to instantiate (2): " + cryptoClassName, e);
< }
< throw new RuntimeException(cryptoClassName + " cannot create
instance");
---
> e.printStackTrace();
> log.error("Unable to instantiate (2): " + cryptoClassName, e);
> throw new RuntimeException(cryptoClassName + " cannot create
> instance");
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]