Exceptions handling

This commit is contained in:
2024-08-18 19:53:40 +03:00
parent 3cb2083222
commit ec394a9b61
6 changed files with 73 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ namespace ApplicationLayer.DataAccessingServices.Locations.RequestHandlers.Admin
if (request.Cities.Distinct().Count() < request.Cities.Length)
{
throw new MultipleIdenticalCitiesInCountry();
throw new MultipleIdenticalCitiesInCountryException();
}
var country = new Country

View File

@@ -2,5 +2,5 @@
namespace ApplicationLayer.DataAccessingServices.Locations.RequestHandlers.AdminRequests.Exceptions
{
public class MultipleIdenticalCitiesInCountry() : ApiException("There are multiple cities with one name in the country.");
public class MultipleIdenticalCitiesInCountryException() : ApiException("There are multiple cities with one name in the country.");
}