1. /*
  2. * @(#)KeyException.java 1.19 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;
  8. /**
  9. * This is the basic key exception.
  10. *
  11. * @see Key
  12. * @see InvalidKeyException
  13. * @see KeyManagementException
  14. *
  15. * @version 1.19 03/12/19
  16. * @author Benjamin Renaud
  17. */
  18. public class KeyException extends GeneralSecurityException {
  19. private static final long serialVersionUID = -7483676942812432108L;
  20. /**
  21. * Constructs a KeyException with no detail message. A detail
  22. * message is a String that describes this particular exception.
  23. */
  24. public KeyException() {
  25. super();
  26. }
  27. /**
  28. * Constructs a KeyException with the specified detail message.
  29. * A detail message is a String that describes this particular
  30. * exception.
  31. *
  32. * @param msg the detail message.
  33. */
  34. public KeyException(String msg) {
  35. super(msg);
  36. }
  37. /**
  38. * Creates a <code>KeyException</code> with the specified
  39. * detail message and cause.
  40. *
  41. * @param message the detail message (which is saved for later retrieval
  42. * by the {@link #getMessage()} method).
  43. * @param cause the cause (which is saved for later retrieval by the
  44. * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
  45. * and indicates that the cause is nonexistent or unknown.)
  46. * @since 1.5
  47. */
  48. public KeyException(String message, Throwable cause) {
  49. super(message, cause);
  50. }
  51. /**
  52. * Creates a <code>KeyException</code> with the specified cause
  53. * and a detail message of <tt>(cause==null ? null : cause.toString())</tt>
  54. * (which typically contains the class and detail message of
  55. * <tt>cause</tt>).
  56. *
  57. * @param cause the cause (which is saved for later retrieval by the
  58. * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
  59. * and indicates that the cause is nonexistent or unknown.)
  60. * @since 1.5
  61. */
  62. public KeyException(Throwable cause) {
  63. super(cause);
  64. }
  65. }