Class SecurityException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.gcube.common.security.exception.SecurityException
All Implemented Interfaces:
Serializable

public class SecurityException extends RuntimeException
An exception class that indicates a security violation.

This is a runtime exception, meaning it does not need to be declared in a method's throws clause. It can be thrown when an operation fails due to insufficient permissions, unauthorized access, or other security-related issues.

See Also:
  • Constructor Details

    • SecurityException

      public SecurityException()
      Constructs a new SecurityException with null as its detail message. The cause is not initialized, and may subsequently be initialized by a call to initCause.
    • SecurityException

      public SecurityException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
      Constructs a new SecurityException with the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.
      Parameters:
      message - The detail message.
      cause - The cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
      enableSuppression - Whether or not suppression is enabled or disabled.
      writableStackTrace - Whether or not the stack trace should be writable.
    • SecurityException

      public SecurityException(String message, Throwable cause)
      Constructs a new SecurityException with the specified detail message and cause.
      Parameters:
      message - The detail message.
      cause - The cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    • SecurityException

      public SecurityException(String message)
      Constructs a new SecurityException with the specified detail message.
      Parameters:
      message - The detail message. The detail message is saved for later retrieval by the getMessage() method.
    • SecurityException

      public SecurityException(Throwable cause)
      Constructs a new SecurityException with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for exceptions that are little more than wrappers for other throwables.
      Parameters:
      cause - The cause. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)