aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-26 23:30:51 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-26 23:30:51 +0300
commit415e7387f7daef038430016b41d16bc5b8cfa0d8 (patch)
tree33908532c000dc8d3f2b7e2a22f687828b05c9a4 /Software/Visual_Studio
parentc56729bbabf1e9eae97269aee0518a70988d00e7 (diff)
downloadTango-415e7387f7daef038430016b41d16bc5b8cfa0d8.tar.gz
Tango-415e7387f7daef038430016b41d16bc5b8cfa0d8.zip
catch error of tfp mcu not found.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/Tango.PMR/ExtensionMethods/VersionPackageDescriptorExtensions.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/ExtensionMethods/VersionPackageDescriptorExtensions.cs b/Software/Visual_Studio/Tango.PMR/ExtensionMethods/VersionPackageDescriptorExtensions.cs
index cb82dc035..8c66b1c12 100644
--- a/Software/Visual_Studio/Tango.PMR/ExtensionMethods/VersionPackageDescriptorExtensions.cs
+++ b/Software/Visual_Studio/Tango.PMR/ExtensionMethods/VersionPackageDescriptorExtensions.cs
@@ -54,6 +54,11 @@ public static class VersionPackageDescriptorExtensions
var mcuFile = descriptor.FileDescriptors.SingleOrDefault(x => x.Destination == VersionFileDestination.Mcu);
+ if (mcuFile == null)
+ {
+ throw new FileNotFoundException("Could not retrieve TFP package version. MCU file not found.");
+ }
+
return Version.Parse(mcuFile.Version);
}