Class SecurityException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.gcube.common.security.exception.SecurityException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionConstructs a newSecurityExceptionwithnullas its detail message.SecurityException(String message) Constructs a newSecurityExceptionwith the specified detail message.SecurityException(String message, Throwable cause) Constructs a newSecurityExceptionwith the specified detail message and cause.SecurityException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) Constructs a newSecurityExceptionwith the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.SecurityException(Throwable cause) Constructs a newSecurityExceptionwith the specified cause and a detail message of(cause==null ? null : cause.toString())(which typically contains the class and detail message ofcause). -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SecurityException
public SecurityException()Constructs a newSecurityExceptionwithnullas its detail message. The cause is not initialized, and may subsequently be initialized by a call toinitCause. -
SecurityException
public SecurityException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) Constructs a newSecurityExceptionwith the specified detail message, cause, suppression enabled or disabled, and writable stack trace enabled or disabled.- Parameters:
message- The detail message.cause- The cause. (Anullvalue 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
Constructs a newSecurityExceptionwith the specified detail message and cause.- Parameters:
message- The detail message.cause- The cause. (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)
-
SecurityException
Constructs a newSecurityExceptionwith the specified detail message.- Parameters:
message- The detail message. The detail message is saved for later retrieval by thegetMessage()method.
-
SecurityException
Constructs a newSecurityExceptionwith the specified cause and a detail message of(cause==null ? null : cause.toString())(which typically contains the class and detail message ofcause). This constructor is useful for exceptions that are little more than wrappers for other throwables.- Parameters:
cause- The cause. (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)
-