From 6e707f642008dfcf19f4d13bde0ab377ee8c1738 Mon Sep 17 00:00:00 2001 From: Shuai Zhang Date: Wed, 18 Dec 2019 01:45:33 +0800 Subject: [PATCH] Catch IOException instead of Exception. --- .../ViewModels/NavigationViewModel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GeothermalResearchInstitute/GeothermalResearchInstitute.Wpf/ViewModels/NavigationViewModel.cs b/GeothermalResearchInstitute/GeothermalResearchInstitute.Wpf/ViewModels/NavigationViewModel.cs index 4c4e29b2..10e1ac6e 100644 --- a/GeothermalResearchInstitute/GeothermalResearchInstitute.Wpf/ViewModels/NavigationViewModel.cs +++ b/GeothermalResearchInstitute/GeothermalResearchInstitute.Wpf/ViewModels/NavigationViewModel.cs @@ -4,6 +4,7 @@ // using System; +using System.IO; using GeothermalResearchInstitute.Wpf.Common; using GeothermalResearchInstitute.Wpf.Views; using Microsoft.Extensions.Logging; @@ -129,7 +130,7 @@ private void ExecuteNavigateToDeviceMetricHistoryExportView() this.regionManager.RequestNavigate(Constants.ContentRegion, nameof(DeviceMetricHistoryExportView)); this.ViewModelContext.NavigateBackTarget = nameof(NavigationView); } - catch (Exception e) + catch (IOException e) { this.logger.LogError(e, "Failed to navigate to device metric history export view."); }