Mikhail, the user working with Keytool may need to know what operation of Keytool failed and the cause of the failure. The messages in IOException, CertificateException and others are API or provider specific and therefore are not so useful for the user. In exceptions thrown by me I set the message showing the __Keytool operation__ which has the problem and some details. This is what is expected from the tool.
2006/6/13, Mikhail Loenko <[EMAIL PROTECTED]>:
Hi Anton Sorry I'm not a guru in keytools but why catch exceptions and resend them? + try { + // try to load the keystore + keyStore.load(fis, storePass); + } catch (NoSuchAlgorithmException e) { + throw new NoSuchAlgorithmException( + "Failed to find the algorithm to check the keystore integrity", + e); + } catch (CertificateException e) { + throw new CertificateException( + "Failed to load a certificate from the keystore. ", e); + } catch (IOException e) { + throw (IOException) new IOException("Failed to load the keystore. ") + .initCause(e); + } + return keyStore; + } Thanks, Mikhail --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Thanks, Anton --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]