Class AuthorizationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ntu.fdae.group1.bto.exceptions.AuthorizationException
- All Implemented Interfaces:
Serializable
Exception thrown when a user attempts to access a resource or perform an
action
for which they do not have proper authorization.
This exception is typically thrown during security checks when:
- A user attempts to access a restricted feature
- A user with insufficient privileges attempts to modify protected data
Handlers for this exception should typically redirect users to an appropriate error page or prompt for authentication as needed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationException
(String message) Constructs a new AuthorizationException with the specified detail message.AuthorizationException
(String message, Throwable cause) Constructs a new AuthorizationException with the specified detail message and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AuthorizationException
Constructs a new AuthorizationException with the specified detail message.- Parameters:
message
- The detail message explaining the reason for the exception
-
AuthorizationException
Constructs a new AuthorizationException with the specified detail message and cause.- Parameters:
message
- The detail message explaining the reason for the exceptioncause
- The cause of the exception (a null value is permitted if the cause is nonexistent or unknown)
-