Class EquipmentNotAvailableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.equipmentrental.equipment_rental_system.exception.EquipmentNotAvailableException
- All Implemented Interfaces:
Serializable
Thrown when a booking is attempted on equipment that is not available (BR-01).
Equipment must be in AVAILABLE or BOOKED status to accept new bookings;
items in MAINTENANCE or UNAVAILABLE status are rejected.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEquipmentNotAvailableException(String equipmentName, EquipmentStatus currentStatus) Creates a new exception describing the unavailable equipment. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EquipmentNotAvailableException
Creates a new exception describing the unavailable equipment.- Parameters:
equipmentName- the name of the equipment itemcurrentStatus- the current status that prevents booking
-