Package exceptions

Class LeaveException

All Implemented Interfaces:
Serializable

public class LeaveException extends Exception
An exception class for leave-related errors.
See Also:
  • Constructor Details

    • LeaveException

      public LeaveException(String message, Throwable cause)
      Constructs a new LeaveException with the specified detail message and cause.
      Parameters:
      message - the detail message (which is saved for later retrieval by the getMessage() method)
      cause - the cause (which is saved for later retrieval by the getCause() method)
  • Method Details

    • throwError_INVALID_DATE

      public static void throwError_INVALID_DATE() throws LeaveException
      Throws a LeaveException for the case of an invalid date.
      Throws:
      LeaveException - the LeaveException with the corresponding error message
    • throwError_INVALID_DATE_RANGE

      public static void throwError_INVALID_DATE_RANGE() throws LeaveException
      Throws a LeaveException for the case of an invalid date range.
      Throws:
      LeaveException - the LeaveException with the corresponding error message
    • throwError_CONFLICTING_DATES

      public static void throwError_CONFLICTING_DATES() throws LeaveException
      Throws a LeaveException for the case of conflicting dates.
      Throws:
      LeaveException - the LeaveException with the corresponding error message
    • throwError_INSUFFICIENT_BALANCE

      public static void throwError_INSUFFICIENT_BALANCE() throws LeaveException
      Throws a LeaveException for the case of insufficient leave balance.
      Throws:
      LeaveException - the LeaveException with the corresponding error message
    • throwError_NO_RECORD_FOUND

      public static void throwError_NO_RECORD_FOUND() throws LeaveException
      Throws a LeaveException for the case when no record is found.
      Throws:
      LeaveException - the LeaveException with the corresponding error message
    • throwError_NO_LEAVE_BALANCE

      public static void throwError_NO_LEAVE_BALANCE() throws LeaveException
      Throws a LeaveException for the case of no leave balance.
      Throws:
      LeaveException - the LeaveException with the corresponding error message
    • throwError_FAILURE_TO_UPDATE_LEAVE_BALANCE

      public static void throwError_FAILURE_TO_UPDATE_LEAVE_BALANCE() throws LeaveException
      Throws a LeaveException for the case of failure to update leave balance.
      Throws:
      LeaveException - the LeaveException with the corresponding error message