Class InvalidBookingDatesException

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

public class InvalidBookingDatesException extends RuntimeException
Thrown when a booking is submitted with an invalid date range (BR-05). The end date must be equal to or later than the start date.
See Also:
  • Constructor Details

    • InvalidBookingDatesException

      public InvalidBookingDatesException(String dateFrom, String dateTo)
      Creates a new exception describing the invalid date range.
      Parameters:
      dateFrom - the submitted start date
      dateTo - the submitted end date (which is before the start date)