mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-17 00:16:28 +08:00
15 lines
466 B
C#
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.")
|
|
{ }
|
|
}
|