From c389f78a656dbaca02b040c09743ff5e975eb542 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 15 Feb 2005 22:05:04 +0000 Subject: * javax/net/ssl/SSLContext.java (getInstance): Add exception message and/or cause before throwing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95075 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 5 +++++ libjava/javax/net/ssl/SSLContext.java | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'libjava') diff --git a/libjava/ChangeLog b/libjava/ChangeLog index fa70cfc2854..0453d4ee3f6 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-02-15 Mark Wielaard + + * javax/net/ssl/SSLContext.java (getInstance): Add exception message + and/or cause before throwing. + 2005-02-15 Richard Henderson * Makefile.am (libgcj_la_SOURCES): Move all sources ... diff --git a/libjava/javax/net/ssl/SSLContext.java b/libjava/javax/net/ssl/SSLContext.java index f69e2678beb..6cab45351bf 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); } } -- cgit v1.2.3