summaryrefslogtreecommitdiff
path: root/javax/net
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2005-02-15 22:03:41 +0000
committerMark Wielaard <mark@klomp.org>2005-02-15 22:03:41 +0000
commit78efd4ba6e673dceb2befb38cbcebddcc5c1bf17 (patch)
tree45127ed8f6fc8123be6fa37d32c4c490ee2a9cec /javax/net
parent83cb92d3fd4f9b44db87861b8832c50ddb176728 (diff)
downloadclasspath-78efd4ba6e673dceb2befb38cbcebddcc5c1bf17.tar.gz
* javax/net/ssl/SSLContext.java (getInstance): Add exception message
and/or cause before throwing.
Diffstat (limited to 'javax/net')
-rw-r--r--javax/net/ssl/SSLContext.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/javax/net/ssl/SSLContext.java b/javax/net/ssl/SSLContext.java
index f69e2678b..6cab45351 100644
--- a/javax/net/ssl/SSLContext.java
+++ b/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);
}
}