Add cause to thrown exception in SelfSignedCert

Motivation:
Exceptions with causes are easier to debug

Modification:
Add the cause when generating a SelfSignedCert

Results:
More debugging context
This commit is contained in:
Carl Mastrangelo 2017-06-22 18:17:50 -07:00 committed by Norman Maurer
parent 7baef4fbe8
commit cbde38f6e9

View File

@ -156,7 +156,8 @@ public final class SelfSignedCertificate {
logger.debug("Failed to generate a self-signed X.509 certificate using Bouncy Castle:", t2);
throw new CertificateException(
"No provider succeeded to generate a self-signed certificate. " +
"See debug log for the root cause.");
"See debug log for the root cause.", t2);
// TODO: consider using Java 7 addSuppressed to append t
}
}