Package exceptions

Class EmployeeRecordsException

java.lang.Object
java.lang.Throwable
java.lang.Exception
exceptions.EmployeeRecordsException
All Implemented Interfaces:
Serializable

public class EmployeeRecordsException extends Exception
An exception class for employee record-related errors.
See Also:
  • Constructor Details

    • EmployeeRecordsException

      public EmployeeRecordsException(String message, Throwable cause)
      Constructs a new EmployeeRecordsException 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 EmployeeRecordsException
      Throws an EmployeeRecordsException for the case when no record is found.
      Throws:
      EmployeeRecordsException - the EmployeeRecordsException with the corresponding error message
    • throwError_DUPLICATE_RECORD

      public static void throwError_DUPLICATE_RECORD() throws EmployeeRecordsException
      Throws an EmployeeRecordsException for the case of a duplicate record.
      Throws:
      EmployeeRecordsException - the EmployeeRecordsException with the corresponding error message
    • throwError_INVALID_SEARCH_FIELD

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

      public static void throwError_EMPTY_FIELD() throws EmployeeRecordsException
      Throws an EmployeeRecordsException for the case of an empty field.
      Throws:
      EmployeeRecordsException - the EmployeeRecordsException with the corresponding error message
    • throwError_NO_CHANGE

      public static void throwError_NO_CHANGE() throws EmployeeRecordsException
      Throws an EmployeeRecordsException for the case when no change is made.
      Throws:
      EmployeeRecordsException - the EmployeeRecordsException with the corresponding error message