From cb1b51c238c64f570d73b7dca6a2eee205b2da01 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sat, 11 Apr 2020 00:54:54 +0300 Subject: Implemented FSE bug reporting !!! --- .../ViewModels/FileSystemViewVM.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/FileSystemViewVM.cs') diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/FileSystemViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/FileSystemViewVM.cs index 6fb46320b..6dea5c146 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/FileSystemViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/FileSystemViewVM.cs @@ -211,7 +211,14 @@ namespace Tango.FSE.PPCConsole.ViewModels { if (e.DifferentFromPrevious) { - await Navigate(null); + try + { + await Navigate(null, null, true); + } + catch (Exception ex) + { + NotificationProvider.PushErrorReportingSnackbar(ex, "PPC Module Error", "Could not initialize the remote file system provider."); + } } } } @@ -406,7 +413,7 @@ namespace Tango.FSE.PPCConsole.ViewModels await Navigate(null, specialFolder); } - private async Task Navigate(String path, Environment.SpecialFolder? specialFolder = null) + private async Task Navigate(String path, Environment.SpecialFolder? specialFolder = null, bool throwError = false) { try { @@ -439,7 +446,14 @@ namespace Tango.FSE.PPCConsole.ViewModels { IsFree = true; Mouse.OverrideCursor = null; - await NotificationProvider.ShowError($"Error navigating to the specified path.\n{ex.FlattenMessage()}"); + if (!throwError) + { + await NotificationProvider.ShowError($"Error navigating to the specified path.\n{ex.FlattenMessage()}"); + } + else + { + throw ex; + } } finally { -- cgit v1.3.1