This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, This makes the exceptions throw much more clear: 2005-02-15 Mark Wielaard <mark@klomp.org> * javax/net/ssl/SSLContext.java (getInstance): Add exception message and/or cause before throwing. Committed to both classpath and libgcj. Cheers, Mark diff -u -r1.2 SSLContext.java --- javax/net/ssl/SSLContext.java 21 Oct 2004 20:57:39 -0000 1.2 +++ javax/net/ssl/SSLContext.java 15 Feb 2005 21:57:13 -0000 @@ -140,7 +140,7 @@ { if (provider == null) { - throw new IllegalArgumentException(); + throw new IllegalArgumentException("null provider"); } Provider p = Security.getProvider(provider); if (p == null) @@ -174,13 +174,13 @@ } 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); } }
Attachment:
signature.asc
Description: This is a digitally signed message part
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |