Class DeletionBlockedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.equipmentrental.equipment_rental_system.exception.DeletionBlockedException
All Implemented Interfaces:
Serializable

public class DeletionBlockedException extends RuntimeException
Thrown when an entity cannot be deleted because it has dependent records. Covers BR-06 (category with assigned equipment) and BR-07 (equipment with active bookings).
See Also:
  • Constructor Details

    • DeletionBlockedException

      public DeletionBlockedException(String entityName, String reason)
      Creates a new exception explaining why deletion was blocked.
      Parameters:
      entityName - the name of the entity that cannot be deleted
      reason - the reason deletion is not allowed