java.lang.Object
java.lang.Throwable
java.lang.Exception
exceptions.AttendanceException
- All Implemented Interfaces:
Serializable
An exception class for attendance-related errors.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAttendanceException
(String message, Throwable cause) Constructs a new AttendanceException with the specified detail message and cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Throws an AttendanceException for the case when a user is already clocked in.static void
Throws an AttendanceException for the case when a user is already clocked out.static void
Throws an AttendanceException for the case of an invalid date.static void
Throws an AttendanceException for the case when no record is found.static void
Throws an AttendanceException for the case when a user is not yet clocked in.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AttendanceException
Constructs a new AttendanceException 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_ALREADY_CLOCKED_IN
Throws an AttendanceException for the case when a user is already clocked in.- Throws:
AttendanceException
- the AttendanceException with the corresponding error message
-
throwError_NOT_CLOCKEDIN
Throws an AttendanceException for the case when a user is not yet clocked in.- Throws:
AttendanceException
- the AttendanceException with the corresponding error message
-
throwError_ALREADY_CLOCKED_OUT
Throws an AttendanceException for the case when a user is already clocked out.- Throws:
AttendanceException
- the AttendanceException with the corresponding error message
-
throwError_NO_RECORD_FOUND
Throws an AttendanceException for the case when no record is found.- Throws:
AttendanceException
- the AttendanceException with the corresponding error message
-
throwError_INVALID_DATE
Throws an AttendanceException for the case of an invalid date.- Throws:
AttendanceException
- the AttendanceException with the corresponding error message
-