public IActionResult Index() { var viewModel = new HomeIndexViewModel(); try { throw new Exception(); var customers = _customerApplicationService.GetAllCustomers(); viewModel.Customers = customers.Select(DataViewModelMapper.Map).ToList(); } catch (BusinessException bex) { TreatHandledException(bex, viewModel); } catch (Exception ex) { TreatUnhandledException(ex, viewModel); } return(View(viewModel)); }