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

public class EquipmentNotAvailableException extends RuntimeException
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 Details

    • EquipmentNotAvailableException

      public EquipmentNotAvailableException(String equipmentName, EquipmentStatus currentStatus)
      Creates a new exception describing the unavailable equipment.
      Parameters:
      equipmentName - the name of the equipment item
      currentStatus - the current status that prevents booking