package de.fete.application.service.exception;

import java.time.LocalDate;
import java.time.OffsetDateTime;

/** Thrown when an event's expiry date is not after the event date. */
public class ExpiryDateBeforeEventException extends RuntimeException {

  /** Creates a new exception for the given dates. */
  public ExpiryDateBeforeEventException(LocalDate expiryDate, OffsetDateTime dateTime) {
    super("Expiry date " + expiryDate + " must be after event date " + dateTime.toLocalDate());
  }
}
