Class ResourceNotFoundException

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

public class ResourceNotFoundException extends RuntimeException
Thrown when a requested entity cannot be found by its ID. This is a generic exception used across all service classes when a lookup by primary key returns no result.
See Also:
  • Constructor Details

    • ResourceNotFoundException

      public ResourceNotFoundException(String resourceName, Long resourceId)
      Creates a new exception with a descriptive message.
      Parameters:
      resourceName - the type of resource (e.g. "Equipment", "Booking")
      resourceId - the ID that was not found