Class AuthorizationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ntu.fdae.group1.bto.exceptions.AuthorizationException
All Implemented Interfaces:
Serializable

public class AuthorizationException extends Exception
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 Details

    • AuthorizationException

      public AuthorizationException(String message)
      Constructs a new AuthorizationException with the specified detail message.
      Parameters:
      message - The detail message explaining the reason for the exception
    • AuthorizationException

      public AuthorizationException(String message, Throwable cause)
      Constructs a new AuthorizationException with the specified detail message and cause.
      Parameters:
      message - The detail message explaining the reason for the exception
      cause - The cause of the exception (a null value is permitted if the cause is nonexistent or unknown)