1. /*
  2. * @(#)CertStoreException.java 1.7 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.security.cert;
  8. import java.security.GeneralSecurityException;
  9. /**
  10. * An exception indicating one of a variety of problems retrieving
  11. * certificates and CRLs from a <code>CertStore</code>.
  12. * <p>
  13. * A <code>CertStoreException</code> provides support for wrapping
  14. * exceptions. The {@link #getCause getCause} method returns the throwable,
  15. * if any, that caused this exception to be thrown.
  16. * <p>
  17. * <b>Concurrent Access</b>
  18. * <p>
  19. * Unless otherwise specified, the methods defined in this class are not
  20. * thread-safe. Multiple threads that need to access a single
  21. * object concurrently should synchronize amongst themselves and
  22. * provide the necessary locking. Multiple threads each manipulating
  23. * separate objects need not synchronize.
  24. *
  25. * @see CertStore
  26. *
  27. * @version 1.7 12/19/03
  28. * @since 1.4
  29. * @author Sean Mullan
  30. */
  31. public class CertStoreException extends GeneralSecurityException {
  32. private static final long serialVersionUID = 2395296107471573245L;
  33. /**
  34. * Creates a <code>CertStoreException</code> with <code>null</code> as
  35. * its detail message.
  36. */
  37. public CertStoreException() {
  38. super();
  39. }
  40. /**
  41. * Creates a <code>CertStoreException</code> with the given detail
  42. * message. A detail message is a <code>String</code> that describes this
  43. * particular exception.
  44. *
  45. * @param msg the detail message
  46. */
  47. public CertStoreException(String msg) {
  48. super(msg);
  49. }
  50. /**
  51. * Creates a <code>CertStoreException</code> that wraps the specified
  52. * throwable. This allows any exception to be converted into a
  53. * <code>CertStoreException</code>, while retaining information about the
  54. * cause, which may be useful for debugging. The detail message is
  55. * set to (<code>cause==null ? null : cause.toString()</code>) (which
  56. * typically contains the class and detail message of cause).
  57. *
  58. * @param cause the cause (which is saved for later retrieval by the
  59. * {@link #getCause getCause()} method). (A <code>null</code> value is
  60. * permitted, and indicates that the cause is nonexistent or unknown.)
  61. */
  62. public CertStoreException(Throwable cause) {
  63. super(cause);
  64. }
  65. /**
  66. * Creates a <code>CertStoreException</code> with the specified detail
  67. * message and cause.
  68. *
  69. * @param msg the detail message
  70. * @param cause the cause (which is saved for later retrieval by the
  71. * {@link #getCause getCause()} method). (A <code>null</code> value is
  72. * permitted, and indicates that the cause is nonexistent or unknown.)
  73. */
  74. public CertStoreException(String msg, Throwable cause) {
  75. super(msg, cause);
  76. }
  77. }