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
This commit is contained in:
Mark Wielaard 2005-02-15 22:05:04 +00:00 committed by Mark Wielaard
parent 40f84775b3
commit affa5a3418
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2005-02-15 Mark Wielaard <mark@klomp.org>
* javax/net/ssl/SSLContext.java (getInstance): Add exception message
and/or cause before throwing.
2005-02-15 Richard Henderson <rth@redhat.com> 2005-02-15 Richard Henderson <rth@redhat.com>
* Makefile.am (libgcj_la_SOURCES): Move all sources ... * Makefile.am (libgcj_la_SOURCES): Move all sources ...

View file

@ -140,7 +140,7 @@ public class SSLContext
{ {
if (provider == null) if (provider == null)
{ {
throw new IllegalArgumentException(); throw new IllegalArgumentException("null provider");
} }
Provider p = Security.getProvider(provider); Provider p = Security.getProvider(provider);
if (p == null) if (p == null)
@ -174,13 +174,13 @@ public class SSLContext
} }
catch (InvocationTargetException ite) catch (InvocationTargetException ite)
{ {
ite.printStackTrace(); NoSuchAlgorithmException nsae = new NoSuchAlgorithmException(protocol);
throw new NoSuchAlgorithmException(); throw (NoSuchAlgorithmException) nsae.initCause(ite);
} }
catch (ClassCastException cce) catch (ClassCastException cce)
{ {
cce.printStackTrace(); NoSuchAlgorithmException nsae = new NoSuchAlgorithmException(protocol);
throw new NoSuchAlgorithmException(); throw (NoSuchAlgorithmException) nsae.initCause(cce);
} }
} }