Mise à jour de 'EntityFramework_LoL/Sources/ApiMappeur/ChampionMapper.cs'
continuous-integration/drone/push Build is failing Details

master
David D'ALMEIDA 2 years ago
parent 5b5fbc4e29
commit 9707d2ce23

@ -9,13 +9,7 @@ namespace ApiMappeur
public static ChampionDTO ToDTO(this Champion item) public static ChampionDTO ToDTO(this Champion item)
{ {
/*if (item == null)
{
var message = string.Format("Champion cannot be empty");
*//*throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, message));
*//*
throw new Exception(message);
}*/
return new ChampionDTO() return new ChampionDTO()
{ {
Icon = item.Icon, Icon = item.Icon,
@ -40,9 +34,8 @@ namespace ApiMappeur
{ {
if (item == null) if (item == null)
{ {
var message = string.Format("Champion with name = {} not found", item.Name); var message = string.Format("Champion is null cannot null it ";
/*throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, message));
*/
throw new Exception(message); throw new Exception(message);
} }
@ -66,8 +59,6 @@ namespace ApiMappeur
if (dto == null) if (dto == null)
{ {
var message = string.Format("Champion cannot be empty"); var message = string.Format("Champion cannot be empty");
/*throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, message));
*/
throw new Exception(message); throw new Exception(message);
} }

Loading…
Cancel
Save