From 4ccb4e31f1562efb0553ec2f64aa3540eb42a276 Mon Sep 17 00:00:00 2001 From: malik masis Date: Thu, 28 Jul 2022 14:06:29 +0300 Subject: [PATCH] removed the manual exception handling --- .../Pages/ProductDetail.cshtml.cs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs index 220cfeff..99ad7431 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs @@ -12,9 +12,8 @@ namespace EShopOnAbp.PublicWeb.Pages public int OrderNo { get; set; } public ProductDto Product { get; private set; } - public bool HasRemoteServiceError { get; set; } = false; - private readonly IPublicProductAppService _productAppService; + private readonly IPublicProductAppService _productAppService; public ProductDetailModel(IPublicProductAppService productAppService) { @@ -23,16 +22,7 @@ namespace EShopOnAbp.PublicWeb.Pages public async Task OnGet(Guid id) { - try - { - Product = await _productAppService.GetAsync(id); - } - catch (Exception e) - { - Product = new ProductDto(); - HasRemoteServiceError = true; - Console.WriteLine(e); - } + Product = await _productAppService.GetAsync(id); } } } \ No newline at end of file