diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-10-15 23:12:39 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-10-15 23:12:39 +0300 |
| commit | 2b31d32af7ebbe27861cdaa639279d98aacf17e6 (patch) | |
| tree | f748bc2801792131b757eb78e0878820e29591e8 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels | |
| parent | 049a79893eac8335ad37defd042533e0fbb8f054 (diff) | |
| download | Tango-2b31d32af7ebbe27861cdaa639279d98aacf17e6.tar.gz Tango-2b31d32af7ebbe27861cdaa639279d98aacf17e6.zip | |
Fixed error handling of bad tfp package from DOK.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs index 23ec956a0..bbace48dd 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs @@ -478,12 +478,14 @@ namespace Tango.PPC.UI.ViewModels packageInfo = await MachineProvider.MachineOperator.GetFirmwarePackageInfo(st); } - vm.Version = packageInfo.FileDescriptors.SingleOrDefault(x => x.Destination == VersionFileDestination.Mcu).Version; + packageInfo.Validate(); + + vm.Version = packageInfo.GetMcuVersion().ToString(); } catch (Exception ex) { LogManager.Log(ex, $"Error loading package info from {fileItem.Path}."); - await NotificationProvider.ShowError("An error occurred while trying to load the selected firmware upgrade package. Please make sure the package is valid."); + await NotificationProvider.ShowError($"An error occurred while trying to load the selected firmware upgrade package.\n{ex.FlattenMessage()}"); return; } |
