8295405: Add cause in a couple of IllegalArgumentException and InvalidParameterException shown by sun/security/pkcs11 tests

Reviewed-by: mdoerr, mullan
This commit is contained in:
Matthias Baesken 2022-10-28 07:04:27 +00:00
parent fd668dc44f
commit d5d34241e2
7 changed files with 24 additions and 16 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -160,7 +160,7 @@ public final class CertAndKeyGen {
}
} catch (Exception e) {
throw new IllegalArgumentException(e.getMessage());
throw new IllegalArgumentException(e.getMessage(), e);
}
generateInternal();
}
@ -176,7 +176,7 @@ public final class CertAndKeyGen {
keyGen.initialize(keyBits, prng);
} catch (Exception e) {
throw new IllegalArgumentException(e.getMessage());
throw new IllegalArgumentException(e.getMessage(), e);
}
}
generateInternal();
@ -349,7 +349,7 @@ public final class CertAndKeyGen {
} catch (IOException e) {
throw new CertificateEncodingException("getSelfCert: " +
e.getMessage());
e.getMessage(), e);
}
}