aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-10-15 23:12:39 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-10-15 23:12:39 +0300
commit2b31d32af7ebbe27861cdaa639279d98aacf17e6 (patch)
treef748bc2801792131b757eb78e0878820e29591e8 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
parent049a79893eac8335ad37defd042533e0fbb8f054 (diff)
downloadTango-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.cs6
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;
}