diff options
author | Mark Wielaard <mark@klomp.org> | 2005-02-15 22:05:04 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2005-02-15 22:05:04 +0000 |
commit | affa5a3418684e31d549d00e824166dbbf7998e2 (patch) | |
tree | cc412b75a409bc0aac4b019086497e6df56c36cd /libjava/javax | |
parent | 40f84775b3a7b9bc9ebd0886d1ad470921c07589 (diff) | |
download | gcc-affa5a3418684e31d549d00e824166dbbf7998e2.zip gcc-affa5a3418684e31d549d00e824166dbbf7998e2.tar.gz gcc-affa5a3418684e31d549d00e824166dbbf7998e2.tar.bz2 |
SSLContext.java (getInstance): Add exception message and/or cause before throwing.
* javax/net/ssl/SSLContext.java (getInstance): Add exception message
and/or cause before throwing.
From-SVN: r95075
Diffstat (limited to 'libjava/javax')
-rw-r--r-- | libjava/javax/net/ssl/SSLContext.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libjava/javax/net/ssl/SSLContext.java b/libjava/javax/net/ssl/SSLContext.java index f69e267..6cab453 100644 --- a/libjava/javax/net/ssl/SSLContext.java +++ b/libjava/javax/net/ssl/SSLContext.java @@ -140,7 +140,7 @@ public class SSLContext { if (provider == null) { - throw new IllegalArgumentException(); + throw new IllegalArgumentException("null provider"); } Provider p = Security.getProvider(provider); if (p == null) @@ -174,13 +174,13 @@ public class SSLContext } catch (InvocationTargetException ite) { - ite.printStackTrace(); - throw new NoSuchAlgorithmException(); + NoSuchAlgorithmException nsae = new NoSuchAlgorithmException(protocol); + throw (NoSuchAlgorithmException) nsae.initCause(ite); } catch (ClassCastException cce) { - cce.printStackTrace(); - throw new NoSuchAlgorithmException(); + NoSuchAlgorithmException nsae = new NoSuchAlgorithmException(protocol); + throw (NoSuchAlgorithmException) nsae.initCause(cce); } } |