Commit affa5a34 by Mark Wielaard Committed by Mark Wielaard

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
parent 40f84775
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 ...
......
...@@ -140,7 +140,7 @@ public class SSLContext ...@@ -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 ...@@ -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);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment