Package exceptions

Class PayrollException

All Implemented Interfaces:
Serializable

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

    • PayrollException

      public PayrollException(String message, Throwable cause)
      Constructs a new PayrollException 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_NO_RECORD_FOUND

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

      public static void throwError_NO_PAYROLL_PROCESSED() throws PayrollException
      Throws a PayrollException for the case when no payroll is processed for a period.
      Throws:
      PayrollException - the PayrollException with the corresponding error message
    • throwError_FAILED_PAYROLL

      public static void throwError_FAILED_PAYROLL() throws PayrollException
      Throws a PayrollException for the case when payroll run fails.
      Throws:
      PayrollException - the PayrollException with the corresponding error message
    • throwError_PAYROLL_ALREADY_PROCESSED

      public static void throwError_PAYROLL_ALREADY_PROCESSED() throws PayrollException
      Throws a PayrollException for the case when payroll is already processed for a period.
      Throws:
      PayrollException - the PayrollException with the corresponding error message
    • throwError_INVALID_SEARCH_FIELD

      public static void throwError_INVALID_SEARCH_FIELD() throws PayrollException
      Throws a PayrollException for the case of an invalid search field.
      Throws:
      PayrollException - the PayrollException with the corresponding error message
    • throwError_INVALID_MANUAL_PAYROLL_DATA

      public static void throwError_INVALID_MANUAL_PAYROLL_DATA() throws PayrollException
      Throws a PayrollException for the case of an invalid manual payroll data.
      Throws:
      PayrollException - the PayrollException with the corresponding error message