1. /*
  2. * @(#)SecurityException.java 1.16 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.lang;
  8. /**
  9. * Thrown by the security manager to indicate a security violation.
  10. *
  11. * @author unascribed
  12. * @version 1.16, 12/19/03
  13. * @see java.lang.SecurityManager
  14. * @since JDK1.0
  15. */
  16. public class SecurityException extends RuntimeException {
  17. private static final long serialVersionUID = 6878364983674394167L;
  18. /**
  19. * Constructs a <code>SecurityException</code> with no detail message.
  20. */
  21. public SecurityException() {
  22. super();
  23. }
  24. /**
  25. * Constructs a <code>SecurityException</code> with the specified
  26. * detail message.
  27. *
  28. * @param s the detail message.
  29. */
  30. public SecurityException(String s) {
  31. super(s);
  32. }
  33. /**
  34. * Creates a <code>SecurityException</code> with the specified
  35. * detail message and cause.
  36. *
  37. * @param message the detail message (which is saved for later retrieval
  38. * by the {@link #getMessage()} method).
  39. * @param cause the cause (which is saved for later retrieval by the
  40. * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
  41. * and indicates that the cause is nonexistent or unknown.)
  42. * @since 1.5
  43. */
  44. public SecurityException(String message, Throwable cause) {
  45. super(message, cause);
  46. }
  47. /**
  48. * Creates a <code>SecurityException</code> with the specified cause
  49. * and a detail message of <tt>(cause==null ? null : cause.toString())</tt>
  50. * (which typically contains the class and detail message of
  51. * <tt>cause</tt>).
  52. *
  53. * @param cause the cause (which is saved for later retrieval by the
  54. * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
  55. * and indicates that the cause is nonexistent or unknown.)
  56. * @since 1.5
  57. */
  58. public SecurityException(Throwable cause) {
  59. super(cause);
  60. }
  61. }