1. /*
  2. * @(#)CertPathBuilderException.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 encountered when
  11. * building a certification path with a <code>CertPathBuilder</code>.
  12. * <p>
  13. * A <code>CertPathBuilderException</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 CertPathBuilder
  26. *
  27. * @version 1.7 12/19/03
  28. * @since 1.4
  29. * @author Sean Mullan
  30. */
  31. public class CertPathBuilderException extends GeneralSecurityException {
  32. private static final long serialVersionUID = 5316471420178794402L;
  33. /**
  34. * Creates a <code>CertPathBuilderException</code> with <code>null</code>
  35. * as its detail message.
  36. */
  37. public CertPathBuilderException() {
  38. super();
  39. }
  40. /**
  41. * Creates a <code>CertPathBuilderException</code> with the given
  42. * detail message. The detail message is a <code>String</code> that
  43. * describes this particular exception in more detail.
  44. *
  45. * @param msg the detail message
  46. */
  47. public CertPathBuilderException(String msg) {
  48. super(msg);
  49. }
  50. /**
  51. * Creates a <code>CertPathBuilderException</code> that wraps the specified
  52. * throwable. This allows any exception to be converted into a
  53. * <code>CertPathBuilderException</code>, while retaining information
  54. * about the wrapped exception, which may be useful for debugging. The
  55. * detail message is set to (<code>cause==null ? null : cause.toString()
  56. * </code>) (which typically contains the class and detail message of
  57. * cause).
  58. *
  59. * @param cause the cause (which is saved for later retrieval by the
  60. * {@link #getCause getCause()} method). (A <code>null</code> value is
  61. * permitted, and indicates that the cause is nonexistent or unknown.)
  62. */
  63. public CertPathBuilderException(Throwable cause) {
  64. super(cause);
  65. }
  66. /**
  67. * Creates a <code>CertPathBuilderException</code> with the specified
  68. * detail message and cause.
  69. *
  70. * @param msg the detail message
  71. * @param cause the cause (which is saved for later retrieval by the
  72. * {@link #getCause getCause()} method). (A <code>null</code> value is
  73. * permitted, and indicates that the cause is nonexistent or unknown.)
  74. */
  75. public CertPathBuilderException(String msg, Throwable cause) {
  76. super(msg, cause);
  77. }
  78. }