java.lang.Object
java.lang.Throwable
java.lang.Exception
exceptions.EmployeeRecordsException
- All Implemented Interfaces:
Serializable
An exception class for employee record-related errors.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmployeeRecordsException
(String message, Throwable cause) Constructs a new EmployeeRecordsException with the specified detail message and cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Throws an EmployeeRecordsException for the case of a duplicate record.static void
Throws an EmployeeRecordsException for the case of an empty field.static void
Throws an EmployeeRecordsException for the case of an invalid search field.static void
Throws an EmployeeRecordsException for the case when no change is made.static void
Throws an EmployeeRecordsException for the case when no record is found.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EmployeeRecordsException
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
Throws an EmployeeRecordsException for the case when no record is found.- Throws:
EmployeeRecordsException
- the EmployeeRecordsException with the corresponding error message
-
throwError_DUPLICATE_RECORD
Throws an EmployeeRecordsException for the case of a duplicate record.- Throws:
EmployeeRecordsException
- the EmployeeRecordsException with the corresponding error message
-
throwError_INVALID_SEARCH_FIELD
Throws an EmployeeRecordsException for the case of an invalid search field.- Throws:
EmployeeRecordsException
- the EmployeeRecordsException with the corresponding error message
-
throwError_EMPTY_FIELD
Throws an EmployeeRecordsException for the case of an empty field.- Throws:
EmployeeRecordsException
- the EmployeeRecordsException with the corresponding error message
-
throwError_NO_CHANGE
Throws an EmployeeRecordsException for the case when no change is made.- Throws:
EmployeeRecordsException
- the EmployeeRecordsException with the corresponding error message
-