2025-04-06 17:55:28 +03:30

15 lines
466 B
C#

namespace Flight.Flights.Exceptions;
using System;
using BuildingBlocks.Exception;
public class FlightExceptions : BadRequestException
{
public FlightExceptions(DateTime departureDate, DateTime arriveDate) :
base($"Departure date: '{departureDate}' must be before arrive date: '{arriveDate}'.")
{ }
public FlightExceptions(DateTime flightDate) :
base($"Flight date: '{flightDate}' must be between departure and arrive dates.")
{ }
}