From 78efd4ba6e673dceb2befb38cbcebddcc5c1bf17 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 15 Feb 2005 22:03:41 +0000 Subject: * javax/net/ssl/SSLContext.java (getInstance): Add exception message and/or cause before throwing. --- javax/net/ssl/SSLContext.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'javax') 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); } } -- cgit v1.2.1