java.lang.Object
java.lang.Throwable
java.lang.Exception
exceptions.LeaveException
- All Implemented Interfaces:
Serializable
An exception class for leave-related errors.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLeaveException
(String message, Throwable cause) Constructs a new LeaveException with the specified detail message and cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Throws a LeaveException for the case of conflicting dates.static void
Throws a LeaveException for the case of failure to update leave balance.static void
Throws a LeaveException for the case of insufficient leave balance.static void
Throws a LeaveException for the case of an invalid date.static void
Throws a LeaveException for the case of an invalid date range.static void
Throws a LeaveException for the case of no leave balance.static void
Throws a LeaveException 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
-
LeaveException
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
Throws a LeaveException for the case of an invalid date.- Throws:
LeaveException
- the LeaveException with the corresponding error message
-
throwError_INVALID_DATE_RANGE
Throws a LeaveException for the case of an invalid date range.- Throws:
LeaveException
- the LeaveException with the corresponding error message
-
throwError_CONFLICTING_DATES
Throws a LeaveException for the case of conflicting dates.- Throws:
LeaveException
- the LeaveException with the corresponding error message
-
throwError_INSUFFICIENT_BALANCE
Throws a LeaveException for the case of insufficient leave balance.- Throws:
LeaveException
- the LeaveException with the corresponding error message
-
throwError_NO_RECORD_FOUND
Throws a LeaveException for the case when no record is found.- Throws:
LeaveException
- the LeaveException with the corresponding error message
-
throwError_NO_LEAVE_BALANCE
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
Throws a LeaveException for the case of failure to update leave balance.- Throws:
LeaveException
- the LeaveException with the corresponding error message
-